File tree 2 files changed +16
-4
lines changed
2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 12
12
\s + /* skip whitespace */
13
13
14
14
[$][{] (. +? )[}] return ' PLACE_HOLDER'
15
- [`][a-zA-Z_ \u4e00 - \u9fa5 ][a-zA- Z0-9_\u4e00 - \u9fa5 ] * [`] return ' IDENTIFIER'
16
- [\w ] + [\u4e00 - \u9fa5 ] + [0-9a-zA-Z_\u4e00 - \u9fa5 ] * return ' IDENTIFIER'
17
- [\u4e00 - \u9fa5 ][0-9a-zA-Z_\u4e00 - \u9fa5 ] * return ' IDENTIFIER'
15
+ [`][a-zA-Z0-9_\u0080 - \uFFFF ] * [`] return ' IDENTIFIER'
16
+ [\w ] + [\u0080 - \uFFFF ] + [0-9a-zA-Z_\u0080 - \uFFFF ] * return ' IDENTIFIER'
17
+ [\u0080 - \uFFFF ][0-9a-zA-Z_\u0080 - \uFFFF ] * return ' IDENTIFIER'
18
18
SELECT return ' SELECT'
19
19
ALL return ' ALL'
20
20
ANY return ' ANY'
@@ -125,7 +125,7 @@ UNION return 'UNION'
125
125
[-] ? [0-9] + (\. [0-9] + )? return ' NUMERIC'
126
126
[-] ? [0-9] + (\. [0-9] + )? [eE][-][0-9] + (\. [0-9] + )? return ' EXPONENT_NUMERIC'
127
127
128
- [a-zA-Z_\u4e00 - \u9fa5 ][a-zA-Z0-9_\u4e00 - \u9fa5 ] * return ' IDENTIFIER'
128
+ [a-zA-Z_\u0080 - \uFFFF ][a-zA-Z0-9_\u0080 - \uFFFF ] * return ' IDENTIFIER'
129
129
\. return ' DOT'
130
130
["][a-zA-Z_\u4e00 -\u9fa5 ][a-zA-Z0-9_\u4e00 -\u9fa5 ] * ["] return ' STRING'
131
131
['][a-zA-Z_\u4e00 -\u9fa5 ][a-zA-Z0-9_\u4e00 -\u9fa5 ] * ['] return ' STRING'
Original file line number Diff line number Diff line change @@ -450,4 +450,16 @@ describe('select grammar support', function () {
450
450
it ( 'test IDENTIFIER' , function ( ) {
451
451
testParser ( 'select `aa#sfs`(a) as \'A A\' from z' ) ;
452
452
} ) ;
453
+
454
+ it ( 'Support unicode extended char (U+0080..U+FFFF) as column name or alias' , function ( ) {
455
+ testParser ( `select
456
+ país,
457
+ MAX(produção) as maior_produção,
458
+ Ĉapelo,
459
+ Δάσος,
460
+ Молоко,
461
+ سلام,
462
+ かわいい
463
+ from table` )
464
+ } )
453
465
} ) ;
You can’t perform that action at this time.
0 commit comments