Skip to content

Fix arithmetic expression parsing #17

@bytorbrynden

Description

@bytorbrynden

Currently, the arithmetic expression parsing is broken, requiring that expressions that contain nested expression, have to be written like this: [ [1 + 1] + 2].
Note the (required) inclusion of the space between the opening brackets...

In the project's current state, the BurstAnalyzer (the BurstLexer's 2nd step), combines all tokens that are alike (read longest match rule), into one.
This causes issues with parsing of things like [[1 + 1] + 2], as [ and [, are considered to be the same token.

To work around this problem, we can include spaces between each of our brackets, but that shouldn't be necessary.

I don't want Burst to be like C++, so I'm going to fix this.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions