We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The following codes produces a syntax error on python:
meta: id: ops endian: le seq: - id: opcode type: u1 - id: arguments type: switch-on: opcode cases: _: u4
the produced code is:
def _read(self): self.opcode = self._io.read_u1() _on = self.opcode else: self.arguments = self._io.read_u4le()
hence a "else" with no "if". Maybe this particular pattern should not be allowed ?
The text was updated successfully, but these errors were encountered:
Good catch, thanks! I don't see any problem with allowing that, so I'd rather fix the codegen.
Sorry, something went wrong.
Add switch_default_only format+KST
b1677f6
Demonstrates possible issues like kaitai-io/kaitai_struct#595 and kaitai-io/kaitai_struct#415
Fixed in kaitai-io/kaitai_struct_compiler@5b1f73b (Lua, Perl & Python) and kaitai-io/kaitai_struct_compiler@5f9f400 (Ruby)
generalmimon
No branches or pull requests
The following codes produces a syntax error on python:
the produced code is:
hence a "else" with no "if".
Maybe this particular pattern should not be allowed ?
The text was updated successfully, but these errors were encountered: