Skip to content
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

Merged

Conversation

lochana-chathura
Copy link
Member

@lochana-chathura lochana-chathura commented Mar 8, 2022

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

  • Read the Contributing Guide
  • Updated Change Log
  • Checked Tooling Support (#)
  • Added necessary tests
    • Unit Tests
    • Spec Conformance Tests
    • Integration Tests
    • Ballerina By Example Tests
  • Increased Test Coverage
  • Added necessary documentation
    • API documentation
    • Module documentation in Module.md files
    • Ballerina By Examples

@lochana-chathura lochana-chathura changed the title Implement parser and error handler changes for spread operator in list construtor Implement parser changes for spread operator in list-constructor-expr Mar 8, 2022
@MaryamZi MaryamZi added the Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times. label Mar 9, 2022
@lochana-chathura lochana-chathura added the Area/Parser Everything related to the ballerina lexer and the parser #Compiler label Mar 9, 2022
@lochana-chathura lochana-chathura marked this pull request as ready for review March 9, 2022 05:19
@codecov
Copy link

codecov bot commented Mar 9, 2022

Codecov Report

❗ No coverage uploaded for pull request base (spread-operator@af76a7e). Click here to learn what that means.
The diff coverage is n/a.

@@                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.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af76a7e...d6e2884. Read the comment docs.

.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) {
Copy link
Contributor

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?

Copy link
Member Author

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.

Co-authored-by: Gimantha Bandara <[email protected]>
@hasithaa
Copy link
Contributor

Looks good to me.

@hasithaa hasithaa merged commit 3a254e5 into ballerina-platform:spread-operator Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area/Parser Everything related to the ballerina lexer and the parser #Compiler Team/CompilerFE All issues related to Language implementation and Compiler, this exclude run times.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants