File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1212\s + /* skip whitespace */
1313
1414[$][{] (. +? )[}] 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'
1818SELECT return ' SELECT'
1919ALL return ' ALL'
2020ANY return ' ANY'
@@ -125,7 +125,7 @@ UNION return 'UNION'
125125[-] ? [0-9] + (\. [0-9] + )? return ' NUMERIC'
126126[-] ? [0-9] + (\. [0-9] + )? [eE][-][0-9] + (\. [0-9] + )? return ' EXPONENT_NUMERIC'
127127
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'
129129\. return ' DOT'
130130["][a-zA-Z_\u4e00 -\u9fa5 ][a-zA-Z0-9_\u4e00 -\u9fa5 ] * ["] return ' STRING'
131131['][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 () {
450450 it ( 'test IDENTIFIER' , function ( ) {
451451 testParser ( 'select `aa#sfs`(a) as \'A A\' from z' ) ;
452452 } ) ;
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+ } )
453465} ) ;
You can’t perform that action at this time.
0 commit comments