-
Notifications
You must be signed in to change notification settings - Fork 758
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
Add parser changes to allow annotations for each member in a tuple #36495
Add parser changes to allow annotations for each member in a tuple #36495
Conversation
compiler/ballerina-treegen/src/main/resources/syntax_tree_descriptor.json
Outdated
Show resolved
Hide resolved
compiler/ballerina-treegen/src/main/resources/syntax_tree_descriptor.json
Outdated
Show resolved
Hide resolved
compiler/ballerina-treegen/src/main/resources/syntax_tree_descriptor.json
Outdated
Show resolved
Hide resolved
...er/src/main/java/io/ballerina/compiler/internal/parser/tree/STTupleMemberDescriptorNode.java
Outdated
Show resolved
Hide resolved
...lerina-parser/src/main/java/io/ballerina/compiler/syntax/tree/TupleMemberDescriptorNode.java
Outdated
Show resolved
Hide resolved
...lerina-parser/src/main/java/io/ballerina/compiler/syntax/tree/TupleMemberDescriptorNode.java
Outdated
Show resolved
Hide resolved
...lerina-parser/src/main/java/io/ballerina/compiler/syntax/tree/TupleMemberDescriptorNode.java
Outdated
Show resolved
Hide resolved
...-parser/src/test/java/io/ballerinalang/compiler/parser/test/syntax/misc/AnnotationsTest.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-treegen/src/main/resources/syntax_tree_descriptor.json
Outdated
Show resolved
Hide resolved
compiler/ballerina-treegen/src/main/resources/syntax_tree_descriptor.json
Outdated
Show resolved
Hide resolved
@ushirask, please fix the PR title to be similar to the commit messages. See #30227 (comment). |
...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
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
Outdated
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
...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
...-parser/src/main/java/io/ballerina/compiler/internal/parser/BallerinaParserErrorHandler.java
Outdated
Show resolved
Hide resolved
...-parser/src/main/java/io/ballerina/compiler/internal/parser/BallerinaParserErrorHandler.java
Outdated
Show resolved
Hide resolved
78a7877
to
8aade1a
Compare
5904b41
to
69cb15c
Compare
compiler/ballerina-parser/src/test/resources/types/tuple-type/tuple_type_source_10.bal
Outdated
Show resolved
Hide resolved
...a-parser/src/test/java/io/ballerinalang/compiler/parser/test/syntax/types/TupleTypeTest.java
Outdated
Show resolved
Hide resolved
compiler/ballerina-parser/src/test/resources/types/tuple-type/tuple_type_assert_09.json
Outdated
Show resolved
Hide resolved
compiler/ballerina-parser/src/test/resources/types/tuple-type/tuple_type_assert_04.json
Outdated
Show resolved
Hide resolved
...dules/formatter-core/src/test/java/org/ballerinalang/formatter/core/ParserTestFormatter.java
Outdated
Show resolved
Hide resolved
...-parser/src/main/java/io/ballerina/compiler/internal/parser/BallerinaParserErrorHandler.java
Show resolved
Hide resolved
compiler/ballerina-parser/src/test/resources/types/tuple-type/tuple_type_source_10.bal
Outdated
Show resolved
Hide resolved
compiler/ballerina-parser/src/test/resources/types/tuple-type/tuple_type_assert_10.json
Outdated
Show resolved
Hide resolved
...es/formatter-core/src/main/java/org/ballerinalang/formatter/core/FormattingTreeModifier.java
Outdated
Show resolved
Hide resolved
...es/formatter-core/src/main/java/org/ballerinalang/formatter/core/FormattingTreeModifier.java
Outdated
Show resolved
Hide resolved
@@ -172,7 +172,8 @@ public List<String> skipList() { | |||
"predeclared-module-prefix_02.bal", "object_type_def_source_44.bal", "record_type_def_source_27.bal", | |||
"func_type_source_09.bal", "func_type_source_13.bal", "func_type_source_14.bal", | |||
"func_type_source_15.bal", "func_type_source_16.bal", "import_decl_source_24.bal", | |||
"member_access_expr_source_11.bal", "float_literal_source_08.bal", "resiliency_source_05.bal"); | |||
"member_access_expr_source_11.bal", "float_literal_source_08.bal", "resiliency_source_05.bal", | |||
"tuple_type_source_12.bal"); |
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.
Formatter should be able to run on top of syntax errors as well.
Any reason we are skipping tuple_type_source_12.bal
?
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.
type T1 [int % @annot string]
is formatted to type T1 [int% @annot string]
, should this be handled in the formatter?
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.
I see. We have #35240. Since int%
get tokenized the same way as int %
we can keep this test as int%
as well while enabling via the formatter.
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.
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.
that's okay for now. Once the aforementioned issue is fixed, this test gets updated anyway.
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.
Let's update the error message
Purpose
Fixes #36390
Approach
Samples
Remarks
Check List