Skip to content
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

No boolean literals #76

Closed
Victorious3 opened this issue Aug 28, 2018 · 1 comment
Closed

No boolean literals #76

Victorious3 opened this issue Aug 28, 2018 · 1 comment

Comments

@Victorious3
Copy link
Collaborator

Victorious3 commented Aug 28, 2018

`10` -> 10
`string` -> 'string'
`'long string'` -> 'long string'
`True` -> 'True'

Since number literals are passed on I would expect the same to happen for boolean literals, but instead they get converted to strings. The same happens for None as well. I can use 0 and 1 instead, but it's not really the same.

Workaround:

t_bool::bool = k_true @:`1` | k_false @:`0`;
t_bool_lit::Boolean = VALUE:t_bool;
@Victorious3
Copy link
Collaborator Author

Victorious3 commented Sep 10, 2018

Related: `0` ends up as {} in the generated parser. Probably some issue with implicit bool conversions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant