Skip to content

Possible weird parsing of unary op #206

@domluna

Description

@domluna

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions