-
Notifications
You must be signed in to change notification settings - Fork 754
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement parser changes for spread operator in list-constructor-expr
#35386
Implement parser changes for spread operator in list-constructor-expr
#35386
Conversation
list-constructor-expr
Codecov Report
@@ Coverage Diff @@
## spread-operator #35386 +/- ##
==================================================
Coverage ? 71.07%
Complexity ? 44941
==================================================
Files ? 3145
Lines ? 181591
Branches ? 23482
==================================================
Hits ? 129063
Misses ? 45301
Partials ? 7227 Continue to review full report at Codecov.
|
...rina-parser/src/main/java/io/ballerina/compiler/internal/parser/tree/STSpreadMemberNode.java
Outdated
Show resolved
Hide resolved
...rc/main/java/io/ballerina/compiler/internal/parser/tree/STListConstructorExpressionNode.java
Outdated
Show resolved
Hide resolved
...rina-parser/src/main/java/io/ballerina/compiler/internal/parser/tree/STSpreadMemberNode.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-parser/src/main/java/io/ballerina/compiler/syntax/tree/SpreadMemberNode.java
Outdated
Show resolved
Hide resolved
439ccce
to
c30d2bd
Compare
...-parser/src/main/java/io/ballerina/compiler/internal/parser/BallerinaParserErrorHandler.java
Outdated
Show resolved
Hide resolved
...er/ballerina-parser/src/main/java/io/ballerina/compiler/internal/parser/BallerinaParser.java
Outdated
Show resolved
Hide resolved
.filter(expression -> this.matchedNode == expression) | ||
.findFirst(); | ||
if (expressionNode.isPresent() && expressionNode.get() instanceof ExpressionNode) { | ||
return Optional.of((ExpressionNode) expressionNode.get()); | ||
if (listMemberNode.isPresent() && listMemberNode.get() instanceof ExpressionNode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SpreadMemberNode
will not be an instance of ExpressionNode
will that be an issue here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #35507. @malinthar will send a fix separately once this is merged.
...er/ballerina-parser/src/main/java/io/ballerina/compiler/internal/parser/BallerinaParser.java
Outdated
Show resolved
Hide resolved
faa382d
to
191a024
Compare
…ssionNode" This reverts commit 4bcdd66.
compiler/ballerina-parser/src/main/java/io/ballerina/compiler/syntax/tree/SpreadMemberNode.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-parser/src/main/java/io/ballerina/compiler/syntax/tree/SpreadMemberNode.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Gimantha Bandara <[email protected]>
1f9e057
to
d6e2884
Compare
Looks good to me. |
Purpose
$subject.
Fixes subtask: implement parser and error handler changes of #35178
Approach
Refer to #35351 (comment)
Samples
N/A
Remarks
N/A
Check List