Skip to content

Conversation

@cirras
Copy link
Collaborator

@cirras cirras commented Feb 10, 2025

This PR fixes a grammar ambiguity around adjacent > and = tokens. (Fixes #318)

We now create >= tokens during parsing by combining the >/= tokens, instead of combining them at the lexing stage.
(For consistently, we're doing this for "less than equal" tokens as well)

This allows us to only create >= tokens when we're parsing a binary expression.

As a result, we can now successfully parse code that looks like this:

const Foo: TArray<Byte>=[1, 2, 3];

Previously this would create a >= token in the middle and make everything fall over.

@cirras cirras requested a review from fourls February 10, 2025 04:50
Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good! A couple questions.

@cirras cirras force-pushed the gte_tokens_are_stupid_and_i_hate_them branch from 2762071 to e83aa79 Compare February 10, 2025 22:05
Copy link
Collaborator

@fourls fourls left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@cirras cirras merged commit 2ce511e into master Feb 10, 2025
4 checks passed
@cirras cirras deleted the gte_tokens_are_stupid_and_i_hate_them branch February 10, 2025 22:43
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 this pull request may close these issues.

parsing error on method parameter declaration "cAdditionalSQL: IDictionary<string, string>=nil"

3 participants