Skip to content

Commit 3385d1d

Browse files
committed
chore: adjust the function call/full column name order in expression
Signed-off-by: h3n4l <[email protected]>
1 parent 017c7fb commit 3385d1d

File tree

6 files changed

+4178
-4179
lines changed

6 files changed

+4178
-4179
lines changed

TSqlLexer.g4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1207,7 +1207,7 @@ FETCH_STATUS: '@@FETCH_STATUS';
12071207

12081208
IPV4_ADDR: DEC_DIGIT+ '.' DEC_DIGIT+ '.' DEC_DIGIT+ '.' DEC_DIGIT+;
12091209

1210-
SPACE: [ \t\r\n]+ -> channel(HIDDEN);
1210+
SPACE: [ \t\r\n] -> channel(HIDDEN);
12111211
// https://docs.microsoft.com/en-us/sql/t-sql/language-elements/slash-star-comment-transact-sql
12121212
COMMENT: '/*' (COMMENT | .)*? '*/' -> channel(HIDDEN);
12131213
LINE_COMMENT: '--' ~[\r\n]* -> channel(HIDDEN);

TSqlLexer.interp

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

TSqlParser.g4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3776,12 +3776,12 @@ constant_LOCAL_ID
37763776
// Operator precendence: https://docs.microsoft.com/en-us/sql/t-sql/language-elements/operator-precedence-transact-sql
37773777
expression
37783778
: primitive_expression
3779+
| full_column_name
37793780
| function_call
37803781
| expression '.' (value_call | query_call | exist_call | modify_call)
37813782
| expression '.' hierarchyid_call
37823783
| expression COLLATE id_
37833784
| case_expression
3784-
| full_column_name
37853785
| bracket_expression
37863786
| unary_operator_expression
37873787
| expression op=('*' | '/' | '%') expression
@@ -6030,7 +6030,7 @@ keyword
60306030
| QUARTER_ABBR
60316031
| MONTH_ABBR
60326032
| DAYOFYEAR_ABBR
6033-
| DAY_ABBR
6033+
| DAY_ABBR
60346034
| WEEK_ABBR
60356035
| HOUR_ABBR
60366036
| MINUTE_ABBR

TSqlParser.interp

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)