-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
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
"unable to find enum member" when using binary notation #150
Comments
@bersbersbers Thanks for reporting. This is a Web IDE-specific issue, due to using a crappy YAML parsing library https://github.com/jeremyfa/yaml.js - see https://gitter.im/kaitai_struct/Lobby?at=62e7c3a9cf6cfd27af5f9523. The YAML parser apparently interprets this: enums:
my_enum:
0b0: x
0b1: y as this: enums:
my_enum:
0: x
0: y and since duplicate keys cannot be preserved in a YAML map, https://github.com/jeremyfa/yaml.js only keeps the first entry with key enums:
my_enum:
0: x And once this tree is passed to At least it's very good that @bersbersbers So you can't use binary literals as enum keys in the Web IDE at the moment, but hex literals (probably the closest substitute for binary literals) should work just fine: enums:
my_enum:
0x0: x
0x1: y |
Sounds good, thanks for the explanation. Good luck having this fixed ;) |
This throws an error:
This works:
The text was updated successfully, but these errors were encountered: