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

Tokens true and false are defined twice. #1167

Closed
mattheww opened this issue Feb 13, 2022 · 1 comment · Fixed by #1189
Closed

Tokens true and false are defined twice. #1167

mattheww opened this issue Feb 13, 2022 · 1 comment · Fixed by #1189

Comments

@mattheww
Copy link
Contributor

At present, true and false are each defined twice in the Lexer blocks: once as keywords and once as part of BOOLEAN_LITERAL.

I think we should do one of:

  • change the BOOLEAN_LITERAL definition to use KW_TRUE | KW_FALSE rather than true | false

  • remove BOOLEAN_LITERAL and update literal-expr.md and patterns.md accordingly

The second is a larger change but seems more in the spirit of #939. It would also make the text

Any kind of literal (string, integer, etc) with any suffix is valid as a token, and can be passed to a macro without producing an error

in tokens.md no longer appear to make a claim about suffixes following true and false.

@Havvy
Copy link
Contributor

Havvy commented Apr 1, 2022

I was asked if I had an opinion on this. I do not; the nitty gritty grammar decisions aren't something I've spent much brainpower thinking about.

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

Successfully merging a pull request may close this issue.

2 participants