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

Possible weird parsing of unary op #206

Open
domluna opened this issue Sep 4, 2020 · 0 comments
Open

Possible weird parsing of unary op #206

domluna opened this issue Sep 4, 2020 · 0 comments
Assignees
Labels
Milestone

Comments

@domluna
Copy link

domluna commented Sep 4, 2020

It's unclear whether these could be parsed better or not but I find it a little weird that the LHS or a binaryopcall is an operator

julia> CSTParser.parse("+++x == 0")
  1:9   BinaryOpCall
  1:5    BinaryOpCall
  1:2     OP: PLUSPLUS
  3:3     OP: PLUS
  4:5     x
  6:8    OP: EQEQ
  9:9    INTEGER: 0

I would think those would be UnaryOpCalls.

julia> CSTParser.parse("+++++x == 0")
  1:11  BinaryOpCall
  1:7    BinaryOpCall
  1:2     OP: PLUSPLUS
  3:4     OP: PLUSPLUS
  5:7     UnaryOpCall
  5:5      OP: PLUS
  6:7      x
  8:10   OP: EQEQ
 11:11   INTEGER: 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants