-
Notifications
You must be signed in to change notification settings - Fork 1
CLIENT-4216 Support IN operation for Lists #65
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
Changes from all commits
a15da5e
0f9cd31
6ea8b80
04ace7e
525a466
e524295
fa54500
7701012
2a74f60
2216412
db3f33d
c91fd7c
28df775
5a94b9e
2b660bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| # top-most EditorConfig file | ||
| root = true | ||
|
|
||
| # Unix-style newlines with a newline ending every file | ||
| [*] | ||
| charset = utf-8 | ||
| end_of_line = lf | ||
|
|
||
| [*.java] | ||
| indent_style = space | ||
| indent_size = 4 | ||
| insert_final_newline = true | ||
| max_line_length = 120 | ||
| ij_java_wrap_long_lines = true | ||
| ij_java_wrap_comments = true | ||
| ij_java_method_call_chain_wrap = normal | ||
| ij_java_blank_lines_after_class_header = 1 | ||
| ij_java_class_count_to_use_import_on_demand = 10 | ||
| ij_java_names_count_to_use_import_on_demand = 10 |
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -33,6 +33,7 @@ comparisonExpression | |||||||
| | bitwiseExpression '<=' bitwiseExpression # LessThanOrEqualExpression | ||||||||
| | bitwiseExpression '==' bitwiseExpression # EqualityExpression | ||||||||
| | bitwiseExpression '!=' bitwiseExpression # InequalityExpression | ||||||||
| | bitwiseExpression IN bitwiseExpression # InExpression | ||||||||
| | bitwiseExpression # BitwiseExpressionWrapper | ||||||||
| ; | ||||||||
|
|
||||||||
|
|
@@ -129,7 +130,9 @@ stringOperand: QUOTED_STRING; | |||||||
|
|
||||||||
| QUOTED_STRING: ('\'' (~'\'')* '\'') | ('"' (~'"')* '"'); | ||||||||
|
|
||||||||
| listConstant: '[' unaryExpression? (',' unaryExpression)* ']'; | ||||||||
| // LIST_TYPE_DESIGNATOR is needed here because the lexer tokenizes '[]' as a single token, | ||||||||
| // preventing the parser from matching it as '[' ']' for empty list literals. | ||||||||
| listConstant: '[' unaryExpression? (',' unaryExpression)* ']' | LIST_TYPE_DESIGNATOR; | ||||||||
|
|
||||||||
| orderedMapConstant: '{' mapPairConstant? (',' mapPairConstant)* '}'; | ||||||||
|
|
||||||||
|
|
@@ -215,7 +218,7 @@ PATH_FUNCTION_CDT_RETURN_TYPE | |||||||
| | 'REVERSE_RANK' | ||||||||
| ; | ||||||||
|
|
||||||||
| binPart: NAME_IDENTIFIER; | ||||||||
| binPart: NAME_IDENTIFIER | IN; | ||||||||
|
|
||||||||
| mapPart | ||||||||
| : MAP_TYPE_DESIGNATOR | ||||||||
|
|
@@ -238,6 +241,7 @@ MAP_TYPE_DESIGNATOR: '{}'; | |||||||
| mapKey | ||||||||
| : NAME_IDENTIFIER | ||||||||
| | QUOTED_STRING | ||||||||
| | IN | ||||||||
| ; | ||||||||
|
|
||||||||
|
Comment on lines
+244
to
246
|
||||||||
| | IN | |
| ; | |
| ; |
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.
The addition of LIST_TYPE_DESIGNATOR as an alternative in the listConstant rule appears unrelated to the IN operation support. The LIST_TYPE_DESIGNATOR token (defined as '[]' on line 417) is already used in the listPart rule for path operations. Adding it here would allow '[]' to be parsed as a list literal, but there are no tests demonstrating this functionality or explaining its purpose in relation to the IN operation. Consider removing this addition if it's not needed for the IN operation, or add tests and documentation if it's intentional.
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.
This is done to handle empty list, added a comment