Feature/compound assignments +semver:feature#247
Merged
Conversation
added 20 commits
May 20, 2026 18:39
Split `TopDownParser` into separate files for better modularity and maintainability. Added implementations for expressions, declarations, and statements handling.
update grammar rules for assignment and cast expressions Refined `AssignmentExpression` grammar to include optional "Operator" and updated `CastExpression` to support dynamic `TypeValue`.
Added validation to throw `ParserException` when no `:` or `=` follows an argument name
simplify expression parsing logic Allow end call expr list with comma
replace `LeftHandSideExpression` with `MemberExpression` in `AssignmentExpression` and related grammar adjustments
simplify declaration parsing logic Replaced `AddToDeclaration` with `DeclarationAssignmentExpression` Prohibited undefined vars like `let x` grammar-wise
- Replaced null returns with `ParserException` for better error handling - Extracted `CurrentIsStatement` for cleaner parsing logic - Updated grammar to improve clarity on `MemberExpression` Closes #233
Specify value of expected tokens for certain types
- Updated `TokenTypes` to separate `Assign` and `Operator` patterns, improving token categorization. - Added `Distinct()` to `TokenTypesProvider` for unique token handling. - Adjusted `GeneratedRegexContainer` to include `ExplicitCapture` for better regex performance. Closes #233
Standardized null safety for parent scopes across AST nodes, replacing direct access with conditional checks and fallback to `Scope.Empty`.
Desugar Compound Assignment Closes #233
Leave Expression the only cloning nodes
|
Minimum allowed coverage is Generated by 🐒 cobertura-action against bbe2292 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Describe the solution you've done
x += 1=>x = x + 1Related Issues
Closes #233