Skip to content

Commit 6bcf038

Browse files
committed
fix: ci test.
1 parent eefbe43 commit 6bcf038

File tree

2 files changed

+42
-23
lines changed

2 files changed

+42
-23
lines changed

dist/parser/sqlParser.js

Lines changed: 26 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/sqlParser.jison

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -147,24 +147,28 @@ selectExprAliasOpt
147147
;
148148

149149
string
150-
: QUOTED_IDENTIFIER { $$ = $1 }
151-
| STRING { $$ = $1 }
150+
: QUOTED_IDENTIFIER { $$ = { type: 'String', value: $1 } }
151+
| STRING { $$ = { type: 'String', value: $1 } }
152152
;
153153
number
154-
: NUMERIC { $$ = $1 }
155-
| EXPONENT_NUMERIC = { $$ = $1 }
156-
| HEX_NUMERIC = { $$ = $1 }
154+
: NUMERIC { $$ = { type: 'Number', value: $1 } }
155+
| EXPONENT_NUMERIC = { $$ = { type: 'Number', value: $1 } }
156+
| HEX_NUMERIC = { $$ = { type: 'Number', value: $1 } }
157157
;
158158
boolean
159-
: TRUE { $$ = 'TRUE' }
160-
| FALSE { $$ = 'FALSE' }
159+
: TRUE { $$ = { type: 'Boolean', value: 'TRUE' } }
160+
| FALSE { $$ = { type: 'Boolean', value: 'FALSE' } }
161+
;
162+
null
163+
: NULL { $$ = { type: 'Null', value: 'null' } }
161164
;
162165
literal
163166
: string { $$ = $1 }
164167
| number { $$ = $1 }
165168
| boolean { $$ = $1 }
166-
| NULL { $$ = $1 }
169+
| null { $$ = $1 }
167170
;
171+
168172
function_call
169173
: IDENTIFIER '(' function_call_param_list ')' { $$ = {type: 'FunctionCall', name: $1, params: $3} }
170174
;
@@ -179,9 +183,12 @@ function_call_param
179183
| SELECT_EXPR_STAR { $$ = $1 }
180184
| expr { $$ = $1 }
181185
;
186+
identifier
187+
: IDENTIFIER { $$ = { type: 'Identifier', value: $1 } }
188+
;
182189
simple_expr
183190
: literal { $$ = $1 }
184-
| IDENTIFIER { $$ = $1 }
191+
| identifier { $$ = $1 }
185192
| function_call { $$ = $1 }
186193
;
187194
bit_expr

0 commit comments

Comments
 (0)