-
Notifications
You must be signed in to change notification settings - Fork 735
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
[Step Extension] Fix parsing of xml step extension #42722
base: xml_step_extension
Are you sure you want to change the base?
[Step Extension] Fix parsing of xml step extension #42722
Conversation
e23049d
to
0d2e2ce
Compare
74c9c83
to
68ae036
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## xml_step_extension #42722 +/- ##
=====================================================
Coverage ? 77.16%
Complexity ? 51257
=====================================================
Files ? 2928
Lines ? 204223
Branches ? 26628
=====================================================
Hits ? 157583
Misses ? 38126
Partials ? 8514 ☔ View full report in Codecov by Sentry. |
This PR has been open for more than 15 days with no activity. This will be closed in 3 days unless the |
...er/ballerina-parser/src/main/java/io/ballerina/compiler/internal/parser/BallerinaParser.java
Show resolved
Hide resolved
...er/ballerina-parser/src/main/java/io/ballerina/compiler/internal/parser/BallerinaParser.java
Outdated
Show resolved
Hide resolved
...er/ballerina-parser/src/main/java/io/ballerina/compiler/internal/parser/BallerinaParser.java
Show resolved
Hide resolved
while (!isEndOfXMLStepExtend(nextToken.kind)) { | ||
if (nextToken.kind == SyntaxKind.DOT_TOKEN) { | ||
STNode dotToken = parseDotToken(); | ||
STNode funcCallExpression = parseFuncCall(parseIdentifier(ParserRuleContext.IDENTIFIER)); |
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.
function-call-expr vs method-call-expr: they have slightly different grammar.
e.g.
- function call allows qualified identifier. Method call does not allow it.
- method-name allows
special-method-name := map | join | start
. Function reference does not allow it
So I think we better parse . method-name ( arg-list )
items separately.
i.e.
parseMethodCallExprRhs() {
parseDotToken()
parseMethodName()
parseParenthesizedArgList()
}
@@ -0,0 +1,132 @@ | |||
/* | |||
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com). |
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.
are the years manually updated? You need to add an entry to syntax_node_metadata.json
. It will automatically pick the year from there.
ee7799b
to
0c727ce
Compare
cc8f3ec
to
18206e3
Compare
Purpose
Update parsing of xml step extension to match the spec.
https://ballerina.io/spec/lang/master/#xml-step-extend
Check List