Skip to content

ordering of parsing statements variants #1019

@OmarTawfik

Description

@OmarTawfik

We should look into this once #808 is ready:

I see ExpressionStatement and VariableDeclarationStatement were moved to the top. Is it just for organization, or does it impact parsing?

I'm asking because almost all other variants start with a unique token, so it should be faster to parse/validate them, instead of trying to parse a full expression, then backtracking when it fails.

Originally posted by @OmarTawfik in #653 (comment)

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions