File tree Expand file tree Collapse file tree 17 files changed +120
-55
lines changed
Expand file tree Collapse file tree 17 files changed +120
-55
lines changed Original file line number Diff line number Diff line change @@ -618,7 +618,8 @@ export type rename_stmt = AstStatement<rename_stmt_node>;
618618
619619export interface set_stmt_node {
620620 type : 'set' ;
621- expr : assign_stmt & { keyword ?: 'GLOBAL' | 'SESSION' | 'LOCAL' | 'PERSIST' | 'PERSIST_ONLY' ; } ;
621+ keyword ?: 'GLOBAL' | 'SESSION' | 'LOCAL' | 'PERSIST' | 'PERSIST_ONLY' | undefined ;
622+ expr : assign_stmt_list ;
622623 }
623624
624625export type set_stmt = AstStatement < set_stmt_node > ;
@@ -1791,6 +1792,8 @@ export interface proc_stmt_t { type: 'proc'; stmt: assign_stmt | return_stmt; va
17911792
17921793export type proc_stmt = AstStatement < proc_stmt_t > ;
17931794
1795+ export type assign_stmt_list = assign_stmt [ ] ;
1796+
17941797export type assign_stmt = { type : 'assign' ; left : var_decl | without_prefix_var_decl ; symbol : ':=' | '=' ; right : proc_expr ; } ;
17951798
17961799export type return_stmt = { type : 'return' ; expr : proc_expr ; } ;
Original file line number Diff line number Diff line change @@ -860,13 +860,14 @@ rename_stmt
860860set_stmt
861861 = KW_SET __
862862 kw : (KW_GLOBAL / KW_SESSION / KW_LOCAL / KW_PERSIST / KW_PERSIST_ONLY )? __
863- a : assign_stmt {
863+ a : assign_stmt_list {
864864 a .keyword = kw
865865 return {
866866 tableList: Array .from (tableList),
867867 columnList: columnListTableAlias (columnList),
868868 ast: {
869869 type: ' set' ,
870+ keyword: kw,
870871 expr: a
871872 }
872873 }
@@ -2519,6 +2520,11 @@ proc_stmt
25192520 return { stmt: s, vars: varList };
25202521 }
25212522
2523+ assign_stmt_list
2524+ = head :assign_stmt tail :(__ COMMA __ assign_stmt )* {
2525+ return createList (head, tail);
2526+ }
2527+
25222528assign_stmt
25232529 = va :(var_decl / without_prefix_var_decl ) __ s : (KW_ASSIGN / KW_ASSIGIN_EQUAL ) __ e :proc_expr {
25242530 return {
Original file line number Diff line number Diff line change @@ -447,6 +447,11 @@ proc_stmt
447447 return { stmt: s, vars: varList };
448448 }
449449
450+ assign_stmt_list
451+ = head :assign_stmt tail :(__ COMMA __ assign_stmt )* {
452+ return createList (head, tail);
453+ }
454+
450455assign_stmt
451456 = va :(var_decl / without_prefix_var_decl ) __ s : (KW_ASSIGN / KW_ASSIGIN_EQUAL ) __ e :proc_expr {
452457 return {
@@ -705,13 +710,14 @@ alter_stmt
705710set_stmt
706711 = KW_SET __
707712 kw : (KW_GLOBAL / KW_SESSION / KW_LOCAL / KW_PERSIST / KW_PERSIST_ONLY )? __
708- a : assign_stmt {
713+ a : assign_stmt_list {
709714 a .keyword = kw
710715 return {
711716 tableList: Array .from (tableList),
712717 columnList: columnListTableAlias (columnList),
713718 ast: {
714719 type: ' set' ,
720+ keyword: kw,
715721 expr: a
716722 }
717723 }
Original file line number Diff line number Diff line change @@ -921,13 +921,14 @@ rename_stmt
921921set_stmt
922922 = KW_SET __
923923 kw : (KW_GLOBAL / KW_SESSION / KW_LOCAL / KW_PERSIST / KW_PERSIST_ONLY )? __
924- a : assign_stmt {
924+ a : assign_stmt_list {
925925 a .keyword = kw
926926 return {
927927 tableList: Array .from (tableList),
928928 columnList: columnListTableAlias (columnList),
929929 ast: {
930930 type: ' set' ,
931+ keyword: kw,
931932 expr: a
932933 }
933934 }
@@ -2486,6 +2487,11 @@ proc_stmt
24862487 return { stmt: s, vars: varList };
24872488 }
24882489
2490+ assign_stmt_list
2491+ = head :assign_stmt tail :(__ COMMA __ assign_stmt )* {
2492+ return createList (head, tail);
2493+ }
2494+
24892495assign_stmt
24902496 = va :(var_decl / without_prefix_var_decl ) __ s : (KW_ASSIGN / KW_ASSIGIN_EQUAL ) __ e :proc_expr {
24912497 return {
Original file line number Diff line number Diff line change @@ -1528,20 +1528,21 @@ rename_stmt
15281528set_stmt
15291529 = KW_SET __
15301530 kw : (KW_GLOBAL / KW_SESSION / KW_LOCAL / KW_PERSIST / KW_PERSIST_ONLY )? __
1531- a : assign_stmt {
1531+ a : assign_stmt_list {
15321532 /*
15331533 export interface set_stmt_node {
15341534 type: 'set';
1535- expr: assign_stmt & { keyword?: 'GLOBAL' | 'SESSION' | 'LOCAL' | 'PERSIST' | 'PERSIST_ONLY'; };
1535+ keyword?: 'GLOBAL' | 'SESSION' | 'LOCAL' | 'PERSIST' | 'PERSIST_ONLY' | undefined;
1536+ expr: assign_stmt;
15361537 }
15371538 => AstStatement<set_stmt_node>
15381539 */
1539- a .keyword = kw
15401540 return {
15411541 tableList: Array .from (tableList),
15421542 columnList: columnListTableAlias (columnList),
15431543 ast: {
15441544 type: ' set' ,
1545+ keyword: kw,
15451546 expr: a
15461547 }
15471548 }
@@ -3621,6 +3622,11 @@ proc_stmt
36213622 return { type: ' proc' , stmt: s, vars: varList };
36223623 }
36233624
3625+ assign_stmt_list
3626+ = head :assign_stmt tail :(__ COMMA __ assign_stmt )* {
3627+ return createList (head, tail);
3628+ }
3629+
36243630assign_stmt
36253631 = va :(var_decl / without_prefix_var_decl ) __ s : (KW_ASSIGN / KW_ASSIGIN_EQUAL ) __ e :proc_expr {
36263632 // => { type: 'assign'; left: var_decl | without_prefix_var_decl; symbol: ':=' | '='; right: proc_expr; }
Original file line number Diff line number Diff line change @@ -860,13 +860,14 @@ rename_stmt
860860set_stmt
861861 = KW_SET __
862862 kw : (KW_GLOBAL / KW_SESSION / KW_LOCAL / KW_PERSIST / KW_PERSIST_ONLY )? __
863- a : assign_stmt {
863+ a : assign_stmt_list {
864864 a .keyword = kw
865865 return {
866866 tableList: Array .from (tableList),
867867 columnList: columnListTableAlias (columnList),
868868 ast: {
869869 type: ' set' ,
870+ keyword: kw,
870871 expr: a
871872 }
872873 }
@@ -2487,6 +2488,11 @@ proc_stmt
24872488 return { stmt: s, vars: varList };
24882489 }
24892490
2491+ assign_stmt_list
2492+ = head :assign_stmt tail :(__ COMMA __ assign_stmt )* {
2493+ return createList (head, tail);
2494+ }
2495+
24902496assign_stmt
24912497 = va :(var_decl / without_prefix_var_decl ) __ s : (KW_ASSIGN / KW_ASSIGIN_EQUAL ) __ e :proc_expr {
24922498 return {
Original file line number Diff line number Diff line change @@ -1482,13 +1482,14 @@ rename_stmt
14821482set_stmt
14831483 = KW_SET __
14841484 kw : (KW_GLOBAL / KW_SESSION / KW_LOCAL / KW_PERSIST / KW_PERSIST_ONLY )? __
1485- a : assign_stmt {
1485+ a : assign_stmt_list {
14861486 a .keyword = kw
14871487 return {
14881488 tableList: Array .from (tableList),
14891489 columnList: columnListTableAlias (columnList),
14901490 ast: {
14911491 type: ' set' ,
1492+ keyword: kw,
14921493 expr: a
14931494 }
14941495 }
@@ -3747,6 +3748,11 @@ proc_stmt
37473748 return { stmt: s, vars: varList };
37483749 }
37493750
3751+ assign_stmt_list
3752+ = head :assign_stmt tail :(__ COMMA __ assign_stmt )* {
3753+ return createList (head, tail);
3754+ }
3755+
37503756assign_stmt
37513757 = va :(var_decl / without_prefix_var_decl ) __ s : (KW_ASSIGN / KW_ASSIGIN_EQUAL ) __ e :proc_expr {
37523758 return {
Original file line number Diff line number Diff line change @@ -1705,13 +1705,14 @@ rename_stmt
17051705set_stmt
17061706 = KW_SET __
17071707 kw : (KW_GLOBAL / KW_SESSION / KW_LOCAL / KW_PERSIST / KW_PERSIST_ONLY )? __
1708- a : assign_stmt {
1708+ a : assign_stmt_list {
17091709 a .keyword = kw
17101710 return {
17111711 tableList: Array .from (tableList),
17121712 columnList: columnListTableAlias (columnList),
17131713 ast: {
17141714 type: ' set' ,
1715+ keyword: kw,
17151716 expr: a
17161717 }
17171718 }
@@ -4068,6 +4069,11 @@ proc_stmt
40684069 return { stmt: s, vars: varList };
40694070 }
40704071
4072+ assign_stmt_list
4073+ = head :assign_stmt tail :(__ COMMA __ assign_stmt )* {
4074+ return createList (head, tail);
4075+ }
4076+
40714077assign_stmt
40724078 = va :(var_decl / without_prefix_var_decl ) __ s : (KW_ASSIGN / KW_ASSIGIN_EQUAL ) __ e :proc_expr {
40734079 return {
Original file line number Diff line number Diff line change @@ -2135,20 +2135,14 @@ rename_stmt
21352135set_stmt
21362136 = KW_SET __
21372137 kw : (KW_GLOBAL / KW_SESSION / KW_LOCAL / KW_PERSIST / KW_PERSIST_ONLY )? __
2138- a : assign_stmt {
2139- /*
2140- export interface set_stmt_node {
2141- type: 'set';
2142- expr: assign_stmt & { keyword?: 'GLOBAL' | 'SESSION' | 'LOCAL' | 'PERSIST' | 'PERSIST_ONLY'; };
2143- }
2144- => AstStatement<set_stmt_node>
2145- */
2138+ a : assign_stmt_list {
21462139 a .keyword = kw
21472140 return {
21482141 tableList: Array .from (tableList),
21492142 columnList: columnListTableAlias (columnList),
21502143 ast: {
21512144 type: ' set' ,
2145+ keyword: kw,
21522146 expr: a
21532147 }
21542148 }
@@ -5047,6 +5041,11 @@ proc_stmt
50475041 return { type: ' proc' , stmt: s, vars: varList }
50485042 }
50495043
5044+ assign_stmt_list
5045+ = head :assign_stmt tail :(__ COMMA __ assign_stmt )* {
5046+ return createList (head, tail);
5047+ }
5048+
50505049assign_stmt
50515050 = va :(var_decl / without_prefix_var_decl ) __ s : (KW_ASSIGN / KW_ASSIGIN_EQUAL ) __ e :proc_expr {
50525051 // => { type: 'assign'; left: var_decl | without_prefix_var_decl; symbol: ':=' | '='; right: proc_expr; }
@@ -5058,7 +5057,6 @@ assign_stmt
50585057 };
50595058 }
50605059
5061-
50625060return_stmt
50635061 = KW_RETURN __ e :proc_expr {
50645062 // => { type: 'return'; expr: proc_expr; }
Original file line number Diff line number Diff line change @@ -2267,20 +2267,21 @@ rename_stmt
22672267set_stmt
22682268 = KW_SET __
22692269 kw : (KW_GLOBAL / KW_SESSION / KW_LOCAL / KW_PERSIST / KW_PERSIST_ONLY )? __
2270- a : assign_stmt {
2270+ a : assign_stmt_list {
22712271 /*
22722272 export interface set_stmt_node {
22732273 type: 'set';
2274- expr: assign_stmt & { keyword?: 'GLOBAL' | 'SESSION' | 'LOCAL' | 'PERSIST' | 'PERSIST_ONLY'; };
2274+ keyword?: 'GLOBAL' | 'SESSION' | 'LOCAL' | 'PERSIST' | 'PERSIST_ONLY' | undefined;
2275+ expr: assign_stmt_list;
22752276 }
22762277 => AstStatement<set_stmt_node>
22772278 */
2278- a .keyword = kw
22792279 return {
22802280 tableList: Array .from (tableList),
22812281 columnList: columnListTableAlias (columnList),
22822282 ast: {
22832283 type: ' set' ,
2284+ keyword: kw,
22842285 expr: a
22852286 }
22862287 }
@@ -5258,6 +5259,12 @@ proc_stmt
52585259 return { type: ' proc' , stmt: s, vars: varList }
52595260 }
52605261
5262+ assign_stmt_list
5263+ = head :assign_stmt tail :(__ COMMA __ assign_stmt )* {
5264+ // => assign_stmt[]
5265+ return createList (head, tail);
5266+ }
5267+
52615268assign_stmt
52625269 = va :(var_decl / without_prefix_var_decl ) __ s :(KW_ASSIGN / KW_ASSIGIN_EQUAL / KW_TO ) __ e :proc_expr {
52635270 // => { type: 'assign'; left: var_decl | without_prefix_var_decl; symbol: ':=' | '='; right: proc_expr; }
You can’t perform that action at this time.
0 commit comments