@@ -5,16 +5,16 @@ token kCLASS kMODULE kDEF kUNDEF kBEGIN kRESCUE kENSURE kEND kIF kUNLESS
5
5
kREDO kRETRY kIN kDO kDO_COND kDO_BLOCK kRETURN kYIELD kSUPER
6
6
kSELF kNIL kTRUE kFALSE kAND kOR kNOT kIF_MOD kUNLESS_MOD kWHILE_MOD
7
7
kUNTIL_MOD kRESCUE_MOD kALIAS kDEFINED klBEGIN klEND k__LINE__
8
- k__FILE__ IDENTIFIER FID GVAR IVAR CONSTANT CVAR NTH_REF
9
- BACK_REF STRING_CONTENT INTEGER FLOAT REGEXP_END ' +@'
8
+ k__FILE__ tIDENTIFIER tFID tGVAR tIVAR tCONSTANT tCVAR tNTH_REF
9
+ tBACK_REF tSTRING_CONTENT tINTEGER tFLOAT tREGEXP_END ' +@'
10
10
' -@' ' -@NUM' tPOW tCMP tEQ tEQQ tNEQ tGEQ tLEQ tANDOP
11
11
tOROP tMATCH tNMATCH ' .' tDOT2 tDOT3 ' []' ' []=' tLSHFT tRSHFT
12
- ' ::' ' ::@' tOP_ASGN ' => ' PAREN_BEG ' (' ' )' tLPAREN_ARG
13
- ARRAY_BEG ' ]' tLBRACE tLBRACE_ARG SPLAT tSTAR2 ' &@' tAMPER2
12
+ ' ::' ' ::@' tOP_ASGN tASSOC tLPAREN ' (' ' )' tLPAREN_ARG
13
+ ARRAY_BEG ' ]' tLBRACE tLBRACE_ARG tSTAR tSTAR2 ' &@' tAMPER2
14
14
tTILDE tPERCENT tDIVIDE ' +' ' -' tLT tGT tPIPE tBANG tCARET
15
- LCURLY ' }' BACK_REF2 SYMBOL_BEG STRING_BEG XSTRING_BEG REGEXP_BEG
16
- WORDS_BEG AWORDS_BEG STRING_DBEG STRING_DVAR STRING_END STRING
17
- SYMBOL ' \\ n' tEH tCOLON ' ,' SPACE ' ;' LABEL LAMBDA LAMBEG kDO_LAMBDA
15
+ tLCURLY ' }' tBACK_REF2 tSYMBEG tSTRING_BEG tXSTRING_BEG tREGEXP_BEG
16
+ tWORDS_BEG tAWORDS_BEG tSTRING_DBEG tSTRING_DVAR tSTRING_END tSTRING
17
+ tSYMBOL ' \\ n' tEH tCOLON ' ,' tSPACE ' ;' tLABEL tLAMBDA tLAMBEG kDO_LAMBDA
18
18
19
19
prechigh
20
20
right tBANG tTILDE ' +@'
@@ -38,7 +38,7 @@ prechigh
38
38
left kOR kAND
39
39
nonassoc kIF_MOD kUNLESS_MOD kWHILE_MOD kUNTIL_MOD
40
40
nonassoc tLBRACE_ARG
41
- nonassoc LOWEST
41
+ nonassoc tLOWEST
42
42
preclow
43
43
44
44
rule
86
86
{
87
87
result = s(:alias, val[1 ], val[3 ])
88
88
}
89
- | kALIAS GVAR GVAR
89
+ | kALIAS tGVAR tGVAR
90
90
{
91
91
result = s(:valias, val[1 ].intern, val[2 ].intern)
92
92
}
93
- | kALIAS GVAR BACK_REF
94
- | kALIAS GVAR NTH_REF
93
+ | kALIAS tGVAR tBACK_REF
94
+ | kALIAS tGVAR tNTH_REF
95
95
{
96
96
result = s(:valias, val[1 ].intern, val[2 ].intern)
97
97
}
119
119
{
120
120
result = s(:rescue_mod, val[0 ], val[2 ])
121
121
}
122
- | klBEGIN LCURLY compstmt ' }'
123
- | klEND LCURLY compstmt ' }'
122
+ | klBEGIN tLCURLY compstmt ' }'
123
+ | klEND tLCURLY compstmt ' }'
124
124
| lhs tEQL command_call
125
125
{
126
126
result = new_assign val[0 ], val[2 ]
@@ -134,12 +134,12 @@ rule
134
134
result = new_op_asgn val[1 ].intern, val[0 ], val[2 ]
135
135
}
136
136
| primary_value ' [@' aref_args ' ]' tOP_ASGN command_call
137
- | primary_value ' .' IDENTIFIER tOP_ASGN command_call
137
+ | primary_value ' .' tIDENTIFIER tOP_ASGN command_call
138
138
{
139
139
result = s(:op_asgn2, val[0 ], " #{val[2]}=" .intern, val[3 ].intern, val[4 ])
140
140
}
141
- | primary_value ' .' CONSTANT tOP_ASGN command_call
142
- | primary_value ' ::' IDENTIFIER tOP_ASGN command_call
141
+ | primary_value ' .' tCONSTANT tOP_ASGN command_call
142
+ | primary_value ' ::' tIDENTIFIER tOP_ASGN command_call
143
143
| backref tOP_ASGN command_call
144
144
| lhs tEQL mrhs
145
145
{
@@ -206,17 +206,17 @@ rule
206
206
207
207
cmd_brace_block: tLBRACE_ARG opt_block_var compstmt ' }'
208
208
209
- command: operation command_args =LOWEST
209
+ command: operation command_args =tLOWEST
210
210
{
211
211
result = new_call nil, val[0 ].intern , val[1 ]
212
212
}
213
213
| operation command_args cmd_brace_block
214
- | primary_value ' .' operation2 command_args =LOWEST
214
+ | primary_value ' .' operation2 command_args =tLOWEST
215
215
{
216
216
result = new_call val[0 ], val[2 ].intern , val[3 ]
217
217
}
218
218
| primary_value ' .' operation2 command_args cmd_brace_block
219
- | primary_value ' ::' operation2 command_args =LOWEST
219
+ | primary_value ' ::' operation2 command_args =tLOWEST
220
220
{
221
221
result = new_call val[0 ], val[2 ].intern , val[3 ]
222
222
}
234
234
{
235
235
result = val[0 ]
236
236
}
237
- | PAREN_BEG mlhs_entry ' )'
237
+ | tLPAREN mlhs_entry ' )'
238
238
{
239
239
result = val[1 ]
240
240
}
243
243
{
244
244
result = val[0 ]
245
245
}
246
- | PAREN_BEG mlhs_entry ' )'
246
+ | tLPAREN mlhs_entry ' )'
247
247
{
248
248
result = val[1 ]
249
249
}
@@ -256,31 +256,31 @@ rule
256
256
{
257
257
result = val[0 ] << val[1 ]
258
258
}
259
- | mlhs_head SPLAT mlhs_node
259
+ | mlhs_head tSTAR mlhs_node
260
260
{
261
261
result = val[0 ] << s (:splat, val[2 ])
262
262
}
263
- | mlhs_head SPLAT mlhs_node ' ,' mlhs_post
264
- | mlhs_head SPLAT
263
+ | mlhs_head tSTAR mlhs_node ' ,' mlhs_post
264
+ | mlhs_head tSTAR
265
265
{
266
266
result = val[0 ] << s (:splat)
267
267
}
268
- | mlhs_head SPLAT ' ,' mlhs_post
269
- | SPLAT mlhs_node
268
+ | mlhs_head tSTAR ' ,' mlhs_post
269
+ | tSTAR mlhs_node
270
270
{
271
271
result = s (:array, s (:splat, val[1 ]))
272
272
}
273
- | SPLAT
273
+ | tSTAR
274
274
{
275
275
result = s (:array, s (:splat))
276
276
}
277
- | SPLAT ' ,' mlhs_post
277
+ | tSTAR ' ,' mlhs_post
278
278
279
279
mlhs_item: mlhs_node
280
280
{
281
281
result = val[0 ]
282
282
}
283
- | PAREN_BEG mlhs_entry ' )'
283
+ | tLPAREN mlhs_entry ' )'
284
284
{
285
285
result = val[1 ]
286
286
}
@@ -307,14 +307,14 @@ rule
307
307
args.type = :arglist if args.type == :array
308
308
result = s (:attrasgn, val[0 ], :[]=, args)
309
309
}
310
- | primary_value ' .' IDENTIFIER
310
+ | primary_value ' .' tIDENTIFIER
311
311
{
312
312
result = new_call val[0 ], val[2 ].intern , s (:arglist)
313
313
}
314
- | primary_value ' ::' IDENTIFIER
315
- | primary_value ' .' CONSTANT
316
- | primary_value ' ::' CONSTANT
317
- | ' ::@' CONSTANT
314
+ | primary_value ' ::' tIDENTIFIER
315
+ | primary_value ' .' tCONSTANT
316
+ | primary_value ' ::' tCONSTANT
317
+ | ' ::@' tCONSTANT
318
318
| backref
319
319
320
320
lhs: variable
@@ -327,29 +327,29 @@ rule
327
327
args.type = :arglist if args.type == :array
328
328
result = s (:attrasgn, val[0 ], :[]=, args)
329
329
}
330
- | primary_value ' .' IDENTIFIER
330
+ | primary_value ' .' tIDENTIFIER
331
331
{
332
332
result = s (:attrasgn, val[0 ], " #{val[2]}=" .intern , s (:arglist))
333
333
}
334
- | primary_value ' ::' IDENTIFIER
334
+ | primary_value ' ::' tIDENTIFIER
335
335
{
336
336
result = s (:attrasgn, val[0 ], " #{val[2]}=" .intern , s (:arglist))
337
337
}
338
- | primary_value ' .' CONSTANT
338
+ | primary_value ' .' tCONSTANT
339
339
{
340
340
result = s (:attrasgn, val[0 ], " #{val[2]}=" .intern , s (:arglist))
341
341
}
342
- | primary_value ' ::' CONSTANT
342
+ | primary_value ' ::' tCONSTANT
343
343
{
344
344
result = s (:colon2, val[0 ], val[2 ].intern )
345
345
}
346
- | ' ::@' CONSTANT
346
+ | ' ::@' tCONSTANT
347
347
{
348
348
result = s (:colon3, val[1 ].intern )
349
349
}
350
350
| backref
351
351
352
- cname: CONSTANT
352
+ cname: tCONSTANT
353
353
354
354
cpath: ' ::@' cname
355
355
{
364
364
result = s (:colon2, val[0 ], val[2 ].intern )
365
365
}
366
366
367
- fname: IDENTIFIER
368
- | CONSTANT
369
- | FID
367
+ fname: tIDENTIFIER
368
+ | tCONSTANT
369
+ | tFID
370
370
| op
371
371
{
372
372
lexer.lex_state = :expr_end
395
395
396
396
op: tPIPE | tCARET | tAMPER2 | tCMP | tEQ | tEQQ
397
397
| tMATCH | tGT | tGEQ | tLT | tLEQ | tLSHFT
398
- | tRSHFT | ' +' | ' -' | tSTAR2 | SPLAT | tDIVIDE
398
+ | tRSHFT | ' +' | ' -' | tSTAR2 | tSTAR | tDIVIDE
399
399
| tPERCENT | tPOW | tTILDE | ' +@' | ' -@' | ' []'
400
- | ' []=' | BACK_REF2 | tBANG | tNEQ
400
+ | ' []=' | tBACK_REF2 | tBANG | tNEQ
401
401
402
402
reswords: k__LINE__ | k__FILE__ | klBEGIN | klEND | kALIAS | kAND
403
403
| kBEGIN | kBREAK | kCASE | kCLASS | kDEF | kDEFINED
@@ -427,14 +427,14 @@ rule
427
427
result = s (:op_asgn1, val[0 ], val[2 ], val[4 ].intern , val[5 ])
428
428
result.line = val[0 ].line
429
429
}
430
- | primary_value ' .' IDENTIFIER tOP_ASGN arg
430
+ | primary_value ' .' tIDENTIFIER tOP_ASGN arg
431
431
{
432
432
result = s (:op_asgn2, val[0 ], " #{val[2]}=" .intern , val[3 ].intern , val[4 ])
433
433
}
434
- | primary_value ' .' CONSTANT tOP_ASGN arg
435
- | primary_value ' ::' IDENTIFIER tOP_ASGN arg
436
- | primary_value ' ::' CONSTANT tOP_ASGN arg
437
- | ' ::@' CONSTANT tOP_ASGN arg
434
+ | primary_value ' .' tCONSTANT tOP_ASGN arg
435
+ | primary_value ' ::' tIDENTIFIER tOP_ASGN arg
436
+ | primary_value ' ::' tCONSTANT tOP_ASGN arg
437
+ | ' ::@' tCONSTANT tOP_ASGN arg
438
438
| backref tOP_ASGN arg
439
439
| arg tDOT2 arg
440
440
{
470
470
{
471
471
result = new_call val[0 ], :" **" , s (:arglist, val[2 ])
472
472
}
473
- | ' -@NUM' INTEGER tPOW arg
474
- | ' -@NUM' FLOAT tPOW arg
473
+ | ' -@NUM' tINTEGER tPOW arg
474
+ | ' -@NUM' tFLOAT tPOW arg
475
475
| ' +@' arg
476
476
{
477
477
result = new_call val[1 ], :" +@" , s (:arglist)
@@ -680,15 +680,15 @@ rule
680
680
{
681
681
result = s (:array, val[0 ])
682
682
}
683
- | SPLAT arg_value
683
+ | tSTAR arg_value
684
684
{
685
685
result = s (:array, s (:splat, val[1 ]))
686
686
}
687
687
| args ' ,' arg_value
688
688
{
689
689
result = val[0 ] << val[2 ]
690
690
}
691
- | args ' ,' SPLAT arg_value
691
+ | args ' ,' tSTAR arg_value
692
692
{
693
693
result = val[0 ] << s (:splat, val[3 ])
694
694
}
698
698
val[0 ] << val[2 ]
699
699
result = val[0 ]
700
700
}
701
- | args ' ,' SPLAT arg_value
702
- | SPLAT arg_value
701
+ | args ' ,' tSTAR arg_value
702
+ | tSTAR arg_value
703
703
{
704
704
result = s (:splat, val[1 ])
705
705
}
712
712
| awords
713
713
| var_ref
714
714
| backref
715
- | FID
715
+ | tFID
716
716
| kBEGIN
717
717
{
718
718
result = lexer.line
@@ -726,15 +726,15 @@ rule
726
726
{
727
727
result = val[1 ]
728
728
}
729
- | PAREN_BEG compstmt ' )'
729
+ | tLPAREN compstmt ' )'
730
730
{
731
731
result = s (:paren, val[1 ] || s (:nil))
732
732
}
733
- | primary_value ' ::' CONSTANT
733
+ | primary_value ' ::' tCONSTANT
734
734
{
735
735
result = s (:colon2, val[0 ], val[2 ].intern )
736
736
}
737
- | ' ::@' CONSTANT
737
+ | ' ::@' tCONSTANT
738
738
{
739
739
result = s (:colon3, val[1 ])
740
740
}
790
790
val[0 ] << val[1 ]
791
791
result = val[0 ]
792
792
}
793
- | LAMBDA lambda
793
+ | tLAMBDA lambda
794
794
{
795
795
result = val[1 ]
796
796
}
961
961
| block_param
962
962
| none
963
963
964
- lambda_body: LAMBEG compstmt ' }'
964
+ lambda_body: tLAMBEG compstmt ' }'
965
965
{
966
966
result = val[1 ]
967
967
}
@@ -1000,7 +1000,7 @@ rule
1000
1000
result = val[0 ]
1001
1001
}
1002
1002
1003
- f_block_opt: IDENTIFIER tEQL primary_value
1003
+ f_block_opt: tIDENTIFIER tEQL primary_value
1004
1004
{
1005
1005
result = new_assign new_assignable (s (:identifier, val[0 ].intern )), val[2 ]
1006
1006
}
@@ -1119,7 +1119,7 @@ opt_block_args_tail: ',' block_args_tail
1119
1119
result = s (:super, nil)
1120
1120
}
1121
1121
1122
- brace_block: LCURLY
1122
+ brace_block: tLCURLY
1123
1123
{
1124
1124
push_scope :block
1125
1125
result = lexer.line
@@ -1179,7 +1179,7 @@ opt_block_args_tail: ',' block_args_tail
1179
1179
| mrhs
1180
1180
| none
1181
1181
1182
- exc_var: ' => ' lhs
1182
+ exc_var: tASSOC lhs
1183
1183
{
1184
1184
result = val[1 ]
1185
1185
}
@@ -1206,30 +1206,30 @@ opt_block_args_tail: ',' block_args_tail
1206
1206
string: string1
1207
1207
| string string1
1208
1208
1209
- string1: STRING_BEG string_contents STRING_END
1209
+ string1: tSTRING_BEG string_contents tSTRING_END
1210
1210
{
1211
1211
result = val[1 ]
1212
1212
}
1213
- | STRING
1213
+ | tSTRING
1214
1214
{
1215
1215
result = s (:str, val[0 ])
1216
1216
}
1217
1217
1218
- xstring: XSTRING_BEG xstring_contents STRING_END
1218
+ xstring: tXSTRING_BEG xstring_contents tSTRING_END
1219
1219
{
1220
1220
result = new_xstr val[1 ]
1221
1221
}
1222
1222
1223
- regexp: REGEXP_BEG xstring_contents REGEXP_END
1223
+ regexp: tREGEXP_BEG xstring_contents tREGEXP_END
1224
1224
{
1225
1225
result = new_regexp val[1 ], val[2 ]
1226
1226
}
1227
1227
1228
- words: WORDS_BEG SPACE STRING_END
1228
+ words: tWORDS_BEG tSPACE tSTRING_END
1229
1229
{
1230
1230
result = s (:array)
1231
1231
}
1232
- | WORDS_BEG word_list STRING_END
1232
+ | tWORDS_BEG word_list tSTRING_END
1233
1233
{
1234
1234
result = val[1 ]
1235
1235
}
@@ -1238,7 +1238,7 @@ opt_block_args_tail: ',' block_args_tail
1238
1238
{
1239
1239
result = s (:array)
1240
1240
}
1241
- | word_list word SPACE
1241
+ | word_list word tSPACE
1242
1242
{
1243
1243
part = val[1 ]
1244
1244
part = s (:dstr, " " , val[1 ]) if part.type == :evstr
@@ -1254,11 +1254,11 @@ opt_block_args_tail: ',' block_args_tail
1254
1254
result = val[0 ].concat ([val[1 ]])
1255
1255
}
1256
1256
1257
- awords: AWORDS_BEG SPACE STRING_END
1257
+ awords: tAWORDS_BEG tSPACE tSTRING_END
1258
1258
{
1259
1259
result = s (:array)
1260
1260
}
1261
- | AWORDS_BEG qword_list STRING_END
1261
+ | tAWORDS_BEG qword_list tSTRING_END
1262
1262
{
1263
1263
result = val[1 ]
1264
1264
}
@@ -1267,7 +1267,7 @@ opt_block_args_tail: ',' block_args_tail
1267
1267
{
1268
1268
result = s (:array)
1269
1269
}
1270
- | qword_list STRING_CONTENT SPACE
1270
+ | qword_list tSTRING_CONTENT tSPACE
1271
1271
{
1272
1272
result = val[0 ] << s (:str, val[1 ])
1273
1273
}
@@ -1290,11 +1290,11 @@ xstring_contents: none
1290
1290
result = str_append val[0 ], val[1 ]
1291
1291
}
1292
1292
1293
- string_content: STRING_CONTENT
1293
+ string_content: tSTRING_CONTENT
1294
1294
{
1295
1295
result = s (:str, val[0 ])
1296
1296
}
1297
- | STRING_DVAR
1297
+ | tSTRING_DVAR
1298
1298
{
1299
1299
result = lexer.strterm
1300
1300
lexer.strterm = nil
@@ -1304,7 +1304,7 @@ xstring_contents: none
1304
1304
lexer.strterm = val[1 ]
1305
1305
result = s (:evstr, val[2 ])
1306
1306
}
1307
- | STRING_DBEG
1307
+ | tSTRING_DBEG
1308
1308
{
1309
1309
lexer.cond_push 0
1310
1310
lexer.cmdarg_push 0
@@ -1320,69 +1320,69 @@ xstring_contents: none
1320
1320
result = s (:evstr, val[2 ])
1321
1321
}
1322
1322
1323
- string_dvar: GVAR
1323
+ string_dvar: tGVAR
1324
1324
{
1325
1325
result = s (:gvar, val[0 ].intern )
1326
1326
}
1327
- | IVAR
1327
+ | tIVAR
1328
1328
{
1329
1329
result = s (:ivar, val[0 ].intern )
1330
1330
}
1331
- | CVAR
1331
+ | tCVAR
1332
1332
{
1333
1333
result = s (:cvar, val[0 ].intern )
1334
1334
}
1335
1335
| backref
1336
1336
1337
1337
1338
- symbol: SYMBOL_BEG sym
1338
+ symbol: tSYMBEG sym
1339
1339
{
1340
1340
result = s (:sym, val[1 ].intern )
1341
1341
lexer.lex_state = :expr_end
1342
1342
}
1343
- | SYMBOL
1343
+ | tSYMBOL
1344
1344
{
1345
1345
result = s (:sym, val[0 ].intern )
1346
1346
}
1347
1347
1348
1348
sym: fname
1349
- | IVAR
1350
- | GVAR
1351
- | CVAR
1349
+ | tIVAR
1350
+ | tGVAR
1351
+ | tCVAR
1352
1352
1353
- dsym: SYMBOL_BEG xstring_contents STRING_END
1353
+ dsym: tSYMBEG xstring_contents tSTRING_END
1354
1354
{
1355
1355
result = new_dsym val[1 ]
1356
1356
}
1357
1357
1358
- numeric: INTEGER
1358
+ numeric: tINTEGER
1359
1359
{
1360
1360
result = s (:int , val[0 ])
1361
1361
}
1362
- | FLOAT
1362
+ | tFLOAT
1363
1363
{
1364
1364
result = s (:float , val[0 ])
1365
1365
}
1366
- | ' -@NUM' INTEGER =LOWEST
1367
- | ' -@NUM' FLOAT =LOWEST
1366
+ | ' -@NUM' tINTEGER =tLOWEST
1367
+ | ' -@NUM' tFLOAT =tLOWEST
1368
1368
1369
- variable: IDENTIFIER
1369
+ variable: tIDENTIFIER
1370
1370
{
1371
1371
result = s (:identifier, val[0 ].intern )
1372
1372
}
1373
- | IVAR
1373
+ | tIVAR
1374
1374
{
1375
1375
result = s (:ivar, val[0 ].intern )
1376
1376
}
1377
- | GVAR
1377
+ | tGVAR
1378
1378
{
1379
1379
result = s (:gvar, val[0 ].intern )
1380
1380
}
1381
- | CONSTANT
1381
+ | tCONSTANT
1382
1382
{
1383
1383
result = s (:const , val[0 ].intern )
1384
1384
}
1385
- | CVAR
1385
+ | tCVAR
1386
1386
{
1387
1387
result = s (:cvar, val[0 ].intern )
1388
1388
}
@@ -1421,11 +1421,11 @@ xstring_contents: none
1421
1421
result = new_assignable val[0 ]
1422
1422
}
1423
1423
1424
- backref: NTH_REF
1424
+ backref: tNTH_REF
1425
1425
{
1426
1426
result = s (:nth_ref, val[0 ])
1427
1427
}
1428
- | BACK_REF
1428
+ | tBACK_REF
1429
1429
1430
1430
superclass: term
1431
1431
{
@@ -1487,23 +1487,23 @@ xstring_contents: none
1487
1487
result = s (:args)
1488
1488
}
1489
1489
1490
- f_norm_arg: CONSTANT
1490
+ f_norm_arg: tCONSTANT
1491
1491
{
1492
1492
raise ' formal argument cannot be a constant'
1493
1493
}
1494
- | IVAR
1494
+ | tIVAR
1495
1495
{
1496
1496
raise ' formal argument cannot be an instance variable'
1497
1497
}
1498
- | CVAR
1498
+ | tCVAR
1499
1499
{
1500
1500
raise ' formal argument cannot be a class variable'
1501
1501
}
1502
- | GVAR
1502
+ | tGVAR
1503
1503
{
1504
1504
raise ' formal argument cannot be a global variable'
1505
1505
}
1506
- | IDENTIFIER
1506
+ | tIDENTIFIER
1507
1507
{
1508
1508
result = val[0 ].intern
1509
1509
scope.add_local result
@@ -1513,7 +1513,7 @@ xstring_contents: none
1513
1513
{
1514
1514
result = val[0 ]
1515
1515
}
1516
- | PAREN_BEG f_margs ' )'
1516
+ | tLPAREN f_margs ' )'
1517
1517
{
1518
1518
result = val[1 ]
1519
1519
}
@@ -1522,7 +1522,7 @@ xstring_contents: none
1522
1522
{
1523
1523
result = s (:lasgn, val[0 ])
1524
1524
}
1525
- | PAREN_BEG f_margs ' )'
1525
+ | tLPAREN f_margs ' )'
1526
1526
1527
1527
f_marg_list: f_marg
1528
1528
{
@@ -1535,10 +1535,10 @@ xstring_contents: none
1535
1535
}
1536
1536
1537
1537
f_margs: f_marg_list
1538
- | f_marg_list ' ,' SPLAT f_norm_arg
1539
- | f_marg_list ' ,' SPLAT
1540
- | SPLAT f_norm_arg
1541
- | SPLAT
1538
+ | f_marg_list ' ,' tSTAR f_norm_arg
1539
+ | f_marg_list ' ,' tSTAR
1540
+ | tSTAR f_norm_arg
1541
+ | tSTAR
1542
1542
1543
1543
f_arg: f_arg_item
1544
1544
{
@@ -1550,7 +1550,7 @@ xstring_contents: none
1550
1550
result = val[0 ]
1551
1551
}
1552
1552
1553
- f_opt: IDENTIFIER tEQL arg_value
1553
+ f_opt: tIDENTIFIER tEQL arg_value
1554
1554
{
1555
1555
result = new_assign new_assignable (s (:identifier, val[0 ].intern )), val[2 ]
1556
1556
}
@@ -1566,9 +1566,9 @@ xstring_contents: none
1566
1566
}
1567
1567
1568
1568
restarg_mark: tSTAR2
1569
- | SPLAT
1569
+ | tSTAR
1570
1570
1571
- f_rest_arg: restarg_mark IDENTIFIER
1571
+ f_rest_arg: restarg_mark tIDENTIFIER
1572
1572
{
1573
1573
result = " *#{val[1]}" .intern
1574
1574
}
@@ -1580,7 +1580,7 @@ xstring_contents: none
1580
1580
blkarg_mark: tAMPER2
1581
1581
| ' &@'
1582
1582
1583
- f_block_arg: blkarg_mark IDENTIFIER
1583
+ f_block_arg: blkarg_mark tIDENTIFIER
1584
1584
{
1585
1585
result = " &#{val[1]}" .intern
1586
1586
}
@@ -1625,26 +1625,26 @@ xstring_contents: none
1625
1625
result = val[0 ].push *val[2 ]
1626
1626
}
1627
1627
1628
- assoc: arg_value ' => ' arg_value
1628
+ assoc: arg_value tASSOC arg_value
1629
1629
{
1630
1630
result = [val[0 ], val[2 ]]
1631
1631
}
1632
- | LABEL arg_value
1632
+ | tLABEL arg_value
1633
1633
{
1634
1634
result = [s (:sym, val[0 ].intern ), val[1 ]]
1635
1635
}
1636
1636
1637
- operation: IDENTIFIER
1638
- | CONSTANT
1639
- | FID
1637
+ operation: tIDENTIFIER
1638
+ | tCONSTANT
1639
+ | tFID
1640
1640
1641
- operation2: IDENTIFIER
1642
- | CONSTANT
1643
- | FID
1641
+ operation2: tIDENTIFIER
1642
+ | tCONSTANT
1643
+ | tFID
1644
1644
| op
1645
1645
1646
- operation3: IDENTIFIER
1647
- | FID
1646
+ operation3: tIDENTIFIER
1647
+ | tFID
1648
1648
| op
1649
1649
1650
1650
dot_or_colon: ' .'
0 commit comments