Skip to content

Fix cast expression grammar#342

Merged
metoule merged 3 commits intodynamicexpresso:masterfrom
metoule:fix_341
Feb 9, 2025
Merged

Fix cast expression grammar#342
metoule merged 3 commits intodynamicexpresso:masterfrom
metoule:fix_341

Conversation

@metoule
Copy link
Copy Markdown
Contributor

@metoule metoule commented Feb 8, 2025

According to the specs, a cast expression is:

cast_expression
    : '(' type ')' unary_expression
    ;

In the current implementation, the grammar is

cast_expression
    : '(' type ')' expression
    ;

which is incorrect.

Fixes #341

@metoule metoule requested a review from davideicardi as a code owner February 8, 2025 09:56
Copy link
Copy Markdown
Member

@davideicardi davideicardi left a comment

Choose a reason for hiding this comment

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

Thank you!

Comment thread test/DynamicExpresso.UnitTest/GithubIssues.cs Outdated
@metoule metoule merged commit 694ceba into dynamicexpresso:master Feb 9, 2025
@metoule metoule deleted the fix_341 branch February 9, 2025 08:25
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.

(T)x precedence is wrong

2 participants