Class: Opal::Parser
- Defined in:
- opal/lib/opal/parser.rb,
opal/lib/opal/parser/grammar.rb
Constant Summary
- Racc_arg =
[ racc_action_table, racc_action_check, racc_action_default, racc_action_pointer, racc_goto_table, racc_goto_check, racc_goto_default, racc_goto_pointer, racc_nt_base, racc_reduce_table, racc_token_table, racc_shift_n, racc_reduce_n, racc_use_result_var ]
- Racc_token_to_s_table =
[ "$end", "error", "kCLASS", "kMODULE", "kDEF", "kUNDEF", "kBEGIN", "kRESCUE", "kENSURE", "kEND", "kIF", "kUNLESS", "kTHEN", "kELSIF", "kELSE", "kCASE", "kWHEN", "kWHILE", "kUNTIL", "kFOR", "kBREAK", "kNEXT", "kREDO", "kRETRY", "kIN", "kDO", "kDO_COND", "kDO_BLOCK", "kDO_LAMBDA", "kRETURN", "kYIELD", "kSUPER", "kSELF", "kNIL", "kTRUE", "kFALSE", "kAND", "kOR", "kNOT", "kIF_MOD", "kUNLESS_MOD", "kWHILE_MOD", "kUNTIL_MOD", "kRESCUE_MOD", "kALIAS", "kDEFINED", "klBEGIN", "klEND", "k__LINE__", "k__FILE__", "k__ENCODING__", "tIDENTIFIER", "tFID", "tGVAR", "tIVAR", "tCONSTANT", "tLABEL", "tCVAR", "tNTH_REF", "tBACK_REF", "tSTRING_CONTENT", "tINTEGER", "tFLOAT", "tREGEXP_END", "tUPLUS", "tUMINUS", "tUMINUS_NUM", "tPOW", "tCMP", "tEQ", "tEQQ", "tNEQ", "tGEQ", "tLEQ", "tANDOP", "tOROP", "tMATCH", "tNMATCH", "tDOT", "tDOT2", "tDOT3", "tAREF", "tASET", "tLSHFT", "tRSHFT", "tCOLON2", "tCOLON3", "tOP_ASGN", "tASSOC", "tLPAREN", "tLPAREN2", "tRPAREN", "tLPAREN_ARG", "ARRAY_BEG", "tRBRACK", "tLBRACE", "tLBRACE_ARG", "tSTAR", "tSTAR2", "tAMPER", "tAMPER2", "tTILDE", "tPERCENT", "tDIVIDE", "tPLUS", "tMINUS", "tLT", "tGT", "tPIPE", "tBANG", "tCARET", "tLCURLY", "tRCURLY", "tBACK_REF2", "tSYMBEG", "tSTRING_BEG", "tXSTRING_BEG", "tREGEXP_BEG", "tWORDS_BEG", "tAWORDS_BEG", "tSTRING_DBEG", "tSTRING_DVAR", "tSTRING_END", "tSTRING", "tSYMBOL", "tNL", "tEH", "tCOLON", "tCOMMA", "tSPACE", "tSEMI", "tLAMBDA", "tLAMBEG", "tLBRACK2", "tLBRACK", "tEQL", "tLOWEST", "\"-@NUM\"", "$start", "program", "top_compstmt", "top_stmts", "opt_terms", "top_stmt", "terms", "stmt", "bodystmt", "compstmt", "opt_rescue", "opt_else", "opt_ensure", "stmts", "fitem", "undef_list", "expr_value", "lhs", "command_call", "mlhs", "var_lhs", "primary_value", "aref_args", "backref", "mrhs", "arg_value", "expr", "@1", "arg", "command", "block_command", "call_args", "block_call", "operation2", "command_args", "cmd_brace_block", "opt_block_var", "operation", "mlhs_basic", "mlhs_entry", "mlhs_head", "mlhs_item", "mlhs_node", "mlhs_post", "variable", "cname", "cpath", "fname", "op", "reswords", "symbol", "opt_nl", "primary", "none", "args", "trailer", "assocs", "paren_args", "opt_paren_args", "opt_block_arg", "block_arg", "call_args2", "open_args", "@2", "literal", "strings", "xstring", "regexp", "words", "awords", "var_ref", "assoc_list", "brace_block", "method_call", "lambda", "then", "if_tail", "do", "case_body", "superclass", "term", "f_arglist", "singleton", "dot_or_colon", "@3", "@4", "@5", "@6", "@7", "@8", "@9", "@10", "@11", "@12", "@13", "@14", "@15", "@16", "@17", "f_larglist", "lambda_body", "block_param", "f_block_optarg", "f_block_opt", "block_args_tail", "f_block_arg", "opt_block_args_tail", "f_arg", "f_rest_arg", "do_block", "@18", "operation3", "@19", "@20", "cases", "@21", "exc_list", "exc_var", "numeric", "dsym", "string", "string1", "string_contents", "xstring_contents", "word_list", "word", "string_content", "qword_list", "string_dvar", "@22", "@23", "sym", "f_args", "f_optarg", "opt_f_block_arg", "f_norm_arg", "f_bad_arg", "f_arg_item", "f_margs", "f_marg", "f_marg_list", "f_opt", "restarg_mark", "blkarg_mark", "assoc" ]
- Racc_debug_parser =
false
Instance Attribute Summary collapse
-
#file ⇒ Object
readonly
Returns the value of attribute file.
-
#lexer ⇒ Object
readonly
Returns the value of attribute lexer.
-
#scope ⇒ Object
readonly
Returns the value of attribute scope.
Instance Method Summary collapse
- #_reduce_10(val, _values, result) ⇒ Object
-
#_reduce_103(val, _values, result) ⇒ Object
reduce 102 omitted.
- #_reduce_104(val, _values, result) ⇒ Object
- #_reduce_105(val, _values, result) ⇒ Object
-
#_reduce_107(val, _values, result) ⇒ Object
reduce 106 omitted.
- #_reduce_108(val, _values, result) ⇒ Object
- #_reduce_11(val, _values, result) ⇒ Object
- #_reduce_12(val, _values, result) ⇒ Object
- #_reduce_13(val, _values, result) ⇒ Object
- #_reduce_14(val, _values, result) ⇒ Object
- #_reduce_15(val, _values, result) ⇒ Object
-
#_reduce_17(val, _values, result) ⇒ Object
reduce 16 omitted.
- #_reduce_18(val, _values, result) ⇒ Object
-
#_reduce_183(val, _values, result) ⇒ Object
reduce 182 omitted.
- #_reduce_184(val, _values, result) ⇒ Object
- #_reduce_185(val, _values, result) ⇒ Object
- #_reduce_186(val, _values, result) ⇒ Object
- #_reduce_187(val, _values, result) ⇒ Object
- #_reduce_19(val, _values, result) ⇒ Object
-
#_reduce_193(val, _values, result) ⇒ Object
reduce 192 omitted.
- #_reduce_194(val, _values, result) ⇒ Object
- #_reduce_195(val, _values, result) ⇒ Object
- #_reduce_196(val, _values, result) ⇒ Object
- #_reduce_197(val, _values, result) ⇒ Object
- #_reduce_198(val, _values, result) ⇒ Object
- #_reduce_199(val, _values, result) ⇒ Object
-
#_reduce_2(val, _values, result) ⇒ Object
reduce 1 omitted.
- #_reduce_20(val, _values, result) ⇒ Object
- #_reduce_200(val, _values, result) ⇒ Object
-
#_reduce_203(val, _values, result) ⇒ Object
reduce 202 omitted.
- #_reduce_204(val, _values, result) ⇒ Object
- #_reduce_205(val, _values, result) ⇒ Object
- #_reduce_206(val, _values, result) ⇒ Object
- #_reduce_207(val, _values, result) ⇒ Object
- #_reduce_208(val, _values, result) ⇒ Object
- #_reduce_209(val, _values, result) ⇒ Object
- #_reduce_21(val, _values, result) ⇒ Object
- #_reduce_210(val, _values, result) ⇒ Object
- #_reduce_211(val, _values, result) ⇒ Object
- #_reduce_212(val, _values, result) ⇒ Object
- #_reduce_213(val, _values, result) ⇒ Object
- #_reduce_214(val, _values, result) ⇒ Object
- #_reduce_215(val, _values, result) ⇒ Object
- #_reduce_216(val, _values, result) ⇒ Object
- #_reduce_217(val, _values, result) ⇒ Object
- #_reduce_218(val, _values, result) ⇒ Object
- #_reduce_219(val, _values, result) ⇒ Object
- #_reduce_22(val, _values, result) ⇒ Object
- #_reduce_220(val, _values, result) ⇒ Object
- #_reduce_221(val, _values, result) ⇒ Object
- #_reduce_222(val, _values, result) ⇒ Object
- #_reduce_223(val, _values, result) ⇒ Object
- #_reduce_224(val, _values, result) ⇒ Object
- #_reduce_225(val, _values, result) ⇒ Object
-
#_reduce_228(val, _values, result) ⇒ Object
reduce 227 omitted.
- #_reduce_229(val, _values, result) ⇒ Object
- #_reduce_23(val, _values, result) ⇒ Object
- #_reduce_230(val, _values, result) ⇒ Object
- #_reduce_231(val, _values, result) ⇒ Object
- #_reduce_232(val, _values, result) ⇒ Object
- #_reduce_233(val, _values, result) ⇒ Object
- #_reduce_234(val, _values, result) ⇒ Object
-
#_reduce_237(val, _values, result) ⇒ Object
reduce 236 omitted.
-
#_reduce_239(val, _values, result) ⇒ Object
reduce 238 omitted.
- #_reduce_240(val, _values, result) ⇒ Object
- #_reduce_241(val, _values, result) ⇒ Object
- #_reduce_242(val, _values, result) ⇒ Object
- #_reduce_243(val, _values, result) ⇒ Object
-
#_reduce_246(val, _values, result) ⇒ Object
reduce 245 omitted.
- #_reduce_247(val, _values, result) ⇒ Object
-
#_reduce_249(val, _values, result) ⇒ Object
reduce 248 omitted.
-
#_reduce_25(val, _values, result) ⇒ Object
reduce 24 omitted.
- #_reduce_250(val, _values, result) ⇒ Object
- #_reduce_251(val, _values, result) ⇒ Object
- #_reduce_252(val, _values, result) ⇒ Object
- #_reduce_253(val, _values, result) ⇒ Object
- #_reduce_254(val, _values, result) ⇒ Object
- #_reduce_255(val, _values, result) ⇒ Object
- #_reduce_256(val, _values, result) ⇒ Object
- #_reduce_257(val, _values, result) ⇒ Object
- #_reduce_258(val, _values, result) ⇒ Object
- #_reduce_259(val, _values, result) ⇒ Object
- #_reduce_26(val, _values, result) ⇒ Object
- #_reduce_260(val, _values, result) ⇒ Object
- #_reduce_27(val, _values, result) ⇒ Object
-
#_reduce_270(val, _values, result) ⇒ Object
reduce 269 omitted.
- #_reduce_271(val, _values, result) ⇒ Object
- #_reduce_272(val, _values, result) ⇒ Object
- #_reduce_273(val, _values, result) ⇒ Object
- #_reduce_274(val, _values, result) ⇒ Object
- #_reduce_275(val, _values, result) ⇒ Object
- #_reduce_276(val, _values, result) ⇒ Object
- #_reduce_277(val, _values, result) ⇒ Object
- #_reduce_278(val, _values, result) ⇒ Object
- #_reduce_279(val, _values, result) ⇒ Object
- #_reduce_280(val, _values, result) ⇒ Object
- #_reduce_281(val, _values, result) ⇒ Object
- #_reduce_282(val, _values, result) ⇒ Object
- #_reduce_283(val, _values, result) ⇒ Object
- #_reduce_284(val, _values, result) ⇒ Object
- #_reduce_285(val, _values, result) ⇒ Object
- #_reduce_286(val, _values, result) ⇒ Object
-
#_reduce_288(val, _values, result) ⇒ Object
reduce 287 omitted.
- #_reduce_289(val, _values, result) ⇒ Object
-
#_reduce_29(val, _values, result) ⇒ Object
reduce 28 omitted.
- #_reduce_290(val, _values, result) ⇒ Object
- #_reduce_291(val, _values, result) ⇒ Object
- #_reduce_292(val, _values, result) ⇒ Object
- #_reduce_293(val, _values, result) ⇒ Object
- #_reduce_294(val, _values, result) ⇒ Object
- #_reduce_295(val, _values, result) ⇒ Object
- #_reduce_296(val, _values, result) ⇒ Object
- #_reduce_297(val, _values, result) ⇒ Object
- #_reduce_298(val, _values, result) ⇒ Object
- #_reduce_299(val, _values, result) ⇒ Object
- #_reduce_3(val, _values, result) ⇒ Object
- #_reduce_300(val, _values, result) ⇒ Object
- #_reduce_301(val, _values, result) ⇒ Object
- #_reduce_302(val, _values, result) ⇒ Object
-
#_reduce_304(val, _values, result) ⇒ Object
reduce 303 omitted.
- #_reduce_305(val, _values, result) ⇒ Object
- #_reduce_306(val, _values, result) ⇒ Object
- #_reduce_307(val, _values, result) ⇒ Object
- #_reduce_308(val, _values, result) ⇒ Object
- #_reduce_309(val, _values, result) ⇒ Object
- #_reduce_310(val, _values, result) ⇒ Object
- #_reduce_311(val, _values, result) ⇒ Object
- #_reduce_312(val, _values, result) ⇒ Object
- #_reduce_313(val, _values, result) ⇒ Object
- #_reduce_314(val, _values, result) ⇒ Object
- #_reduce_315(val, _values, result) ⇒ Object
- #_reduce_316(val, _values, result) ⇒ Object
- #_reduce_317(val, _values, result) ⇒ Object
- #_reduce_318(val, _values, result) ⇒ Object
- #_reduce_319(val, _values, result) ⇒ Object
-
#_reduce_329(val, _values, result) ⇒ Object
reduce 328 omitted.
-
#_reduce_33(val, _values, result) ⇒ Object
reduce 32 omitted.
- #_reduce_330(val, _values, result) ⇒ Object
- #_reduce_331(val, _values, result) ⇒ Object
-
#_reduce_334(val, _values, result) ⇒ Object
reduce 333 omitted.
- #_reduce_335(val, _values, result) ⇒ Object
- #_reduce_336(val, _values, result) ⇒ Object
- #_reduce_337(val, _values, result) ⇒ Object
-
#_reduce_339(val, _values, result) ⇒ Object
reduce 338 omitted.
- #_reduce_34(val, _values, result) ⇒ Object
- #_reduce_340(val, _values, result) ⇒ Object
- #_reduce_341(val, _values, result) ⇒ Object
- #_reduce_342(val, _values, result) ⇒ Object
-
#_reduce_344(val, _values, result) ⇒ Object
reduce 343 omitted.
- #_reduce_345(val, _values, result) ⇒ Object
- #_reduce_346(val, _values, result) ⇒ Object
- #_reduce_347(val, _values, result) ⇒ Object
- #_reduce_348(val, _values, result) ⇒ Object
- #_reduce_349(val, _values, result) ⇒ Object
- #_reduce_35(val, _values, result) ⇒ Object
- #_reduce_350(val, _values, result) ⇒ Object
- #_reduce_351(val, _values, result) ⇒ Object
- #_reduce_352(val, _values, result) ⇒ Object
- #_reduce_353(val, _values, result) ⇒ Object
- #_reduce_354(val, _values, result) ⇒ Object
- #_reduce_355(val, _values, result) ⇒ Object
- #_reduce_356(val, _values, result) ⇒ Object
- #_reduce_357(val, _values, result) ⇒ Object
- #_reduce_358(val, _values, result) ⇒ Object
- #_reduce_359(val, _values, result) ⇒ Object
- #_reduce_360(val, _values, result) ⇒ Object
- #_reduce_361(val, _values, result) ⇒ Object
-
#_reduce_364(val, _values, result) ⇒ Object
reduce 363 omitted.
- #_reduce_365(val, _values, result) ⇒ Object
- #_reduce_366(val, _values, result) ⇒ Object
- #_reduce_367(val, _values, result) ⇒ Object
- #_reduce_368(val, _values, result) ⇒ Object
- #_reduce_369(val, _values, result) ⇒ Object
- #_reduce_370(val, _values, result) ⇒ Object
- #_reduce_371(val, _values, result) ⇒ Object
- #_reduce_372(val, _values, result) ⇒ Object
- #_reduce_373(val, _values, result) ⇒ Object
- #_reduce_374(val, _values, result) ⇒ Object
- #_reduce_375(val, _values, result) ⇒ Object
- #_reduce_376(val, _values, result) ⇒ Object
- #_reduce_377(val, _values, result) ⇒ Object
-
#_reduce_379(val, _values, result) ⇒ Object
reduce 378 omitted.
-
#_reduce_38(val, _values, result) ⇒ Object
reduce 37 omitted.
- #_reduce_380(val, _values, result) ⇒ Object
- #_reduce_381(val, _values, result) ⇒ Object
-
#_reduce_384(val, _values, result) ⇒ Object
reduce 383 omitted.
- #_reduce_385(val, _values, result) ⇒ Object
- #_reduce_386(val, _values, result) ⇒ Object
- #_reduce_39(val, _values, result) ⇒ Object
-
#_reduce_391(val, _values, result) ⇒ Object
reduce 390 omitted.
-
#_reduce_394(val, _values, result) ⇒ Object
reduce 393 omitted.
- #_reduce_395(val, _values, result) ⇒ Object
- #_reduce_396(val, _values, result) ⇒ Object
- #_reduce_397(val, _values, result) ⇒ Object
- #_reduce_398(val, _values, result) ⇒ Object
- #_reduce_399(val, _values, result) ⇒ Object
- #_reduce_4(val, _values, result) ⇒ Object
- #_reduce_40(val, _values, result) ⇒ Object
- #_reduce_400(val, _values, result) ⇒ Object
- #_reduce_401(val, _values, result) ⇒ Object
- #_reduce_402(val, _values, result) ⇒ Object
- #_reduce_403(val, _values, result) ⇒ Object
- #_reduce_404(val, _values, result) ⇒ Object
- #_reduce_405(val, _values, result) ⇒ Object
- #_reduce_406(val, _values, result) ⇒ Object
- #_reduce_407(val, _values, result) ⇒ Object
- #_reduce_408(val, _values, result) ⇒ Object
- #_reduce_409(val, _values, result) ⇒ Object
- #_reduce_41(val, _values, result) ⇒ Object
- #_reduce_410(val, _values, result) ⇒ Object
- #_reduce_411(val, _values, result) ⇒ Object
- #_reduce_412(val, _values, result) ⇒ Object
- #_reduce_413(val, _values, result) ⇒ Object
- #_reduce_414(val, _values, result) ⇒ Object
- #_reduce_415(val, _values, result) ⇒ Object
- #_reduce_416(val, _values, result) ⇒ Object
- #_reduce_417(val, _values, result) ⇒ Object
- #_reduce_418(val, _values, result) ⇒ Object
- #_reduce_419(val, _values, result) ⇒ Object
-
#_reduce_421(val, _values, result) ⇒ Object
reduce 420 omitted.
- #_reduce_422(val, _values, result) ⇒ Object
-
#_reduce_427(val, _values, result) ⇒ Object
reduce 426 omitted.
- #_reduce_428(val, _values, result) ⇒ Object
- #_reduce_429(val, _values, result) ⇒ Object
-
#_reduce_432(val, _values, result) ⇒ Object
reduce 431 omitted.
- #_reduce_433(val, _values, result) ⇒ Object
- #_reduce_434(val, _values, result) ⇒ Object
- #_reduce_435(val, _values, result) ⇒ Object
- #_reduce_436(val, _values, result) ⇒ Object
- #_reduce_437(val, _values, result) ⇒ Object
- #_reduce_438(val, _values, result) ⇒ Object
- #_reduce_439(val, _values, result) ⇒ Object
- #_reduce_440(val, _values, result) ⇒ Object
- #_reduce_441(val, _values, result) ⇒ Object
- #_reduce_442(val, _values, result) ⇒ Object
- #_reduce_443(val, _values, result) ⇒ Object
- #_reduce_444(val, _values, result) ⇒ Object
- #_reduce_445(val, _values, result) ⇒ Object
-
#_reduce_447(val, _values, result) ⇒ Object
reduce 446 omitted.
- #_reduce_448(val, _values, result) ⇒ Object
- #_reduce_449(val, _values, result) ⇒ Object
- #_reduce_450(val, _values, result) ⇒ Object
- #_reduce_451(val, _values, result) ⇒ Object
- #_reduce_452(val, _values, result) ⇒ Object
- #_reduce_453(val, _values, result) ⇒ Object
- #_reduce_454(val, _values, result) ⇒ Object
- #_reduce_455(val, _values, result) ⇒ Object
- #_reduce_456(val, _values, result) ⇒ Object
- #_reduce_457(val, _values, result) ⇒ Object
- #_reduce_458(val, _values, result) ⇒ Object
- #_reduce_459(val, _values, result) ⇒ Object
-
#_reduce_46(val, _values, result) ⇒ Object
reduce 45 omitted.
- #_reduce_460(val, _values, result) ⇒ Object
-
#_reduce_462(val, _values, result) ⇒ Object
reduce 461 omitted.
- #_reduce_463(val, _values, result) ⇒ Object
- #_reduce_464(val, _values, result) ⇒ Object
- #_reduce_465(val, _values, result) ⇒ Object
- #_reduce_466(val, _values, result) ⇒ Object
- #_reduce_467(val, _values, result) ⇒ Object
- #_reduce_468(val, _values, result) ⇒ Object
- #_reduce_469(val, _values, result) ⇒ Object
- #_reduce_47(val, _values, result) ⇒ Object
-
#_reduce_471(val, _values, result) ⇒ Object
reduce 470 omitted.
- #_reduce_472(val, _values, result) ⇒ Object
-
#_reduce_478(val, _values, result) ⇒ Object
reduce 477 omitted.
- #_reduce_479(val, _values, result) ⇒ Object
- #_reduce_48(val, _values, result) ⇒ Object
- #_reduce_480(val, _values, result) ⇒ Object
- #_reduce_481(val, _values, result) ⇒ Object
- #_reduce_482(val, _values, result) ⇒ Object
-
#_reduce_485(val, _values, result) ⇒ Object
reduce 484 omitted.
- #_reduce_486(val, _values, result) ⇒ Object
-
#_reduce_489(val, _values, result) ⇒ Object
reduce 488 omitted.
- #_reduce_490(val, _values, result) ⇒ Object
- #_reduce_491(val, _values, result) ⇒ Object
- #_reduce_492(val, _values, result) ⇒ Object
- #_reduce_493(val, _values, result) ⇒ Object
- #_reduce_494(val, _values, result) ⇒ Object
- #_reduce_495(val, _values, result) ⇒ Object
- #_reduce_496(val, _values, result) ⇒ Object
- #_reduce_497(val, _values, result) ⇒ Object
- #_reduce_498(val, _values, result) ⇒ Object
- #_reduce_499(val, _values, result) ⇒ Object
- #_reduce_5(val, _values, result) ⇒ Object
-
#_reduce_523(val, _values, result) ⇒ Object
reduce 522 omitted.
-
#_reduce_53(val, _values, result) ⇒ Object
reduce 52 omitted.
-
#_reduce_55(val, _values, result) ⇒ Object
reduce 54 omitted.
-
#_reduce_57(val, _values, result) ⇒ Object
reduce 56 omitted.
-
#_reduce_59(val, _values, result) ⇒ Object
reduce 58 omitted.
- #_reduce_60(val, _values, result) ⇒ Object
- #_reduce_61(val, _values, result) ⇒ Object
- #_reduce_62(val, _values, result) ⇒ Object
- #_reduce_63(val, _values, result) ⇒ Object
- #_reduce_64(val, _values, result) ⇒ Object
- #_reduce_65(val, _values, result) ⇒ Object
- #_reduce_66(val, _values, result) ⇒ Object
- #_reduce_67(val, _values, result) ⇒ Object
-
#_reduce_69(val, _values, result) ⇒ Object
reduce 68 omitted.
-
#_reduce_7(val, _values, result) ⇒ Object
reduce 6 omitted.
-
#_reduce_71(val, _values, result) ⇒ Object
reduce 70 omitted.
- #_reduce_72(val, _values, result) ⇒ Object
-
#_reduce_74(val, _values, result) ⇒ Object
reduce 73 omitted.
- #_reduce_75(val, _values, result) ⇒ Object
- #_reduce_76(val, _values, result) ⇒ Object
- #_reduce_77(val, _values, result) ⇒ Object
- #_reduce_8(val, _values, result) ⇒ Object
-
#_reduce_80(val, _values, result) ⇒ Object
reduce 79 omitted.
- #_reduce_81(val, _values, result) ⇒ Object
- #_reduce_82(val, _values, result) ⇒ Object
-
#_reduce_88(val, _values, result) ⇒ Object
reduce 87 omitted.
- #_reduce_89(val, _values, result) ⇒ Object
- #_reduce_9(val, _values, result) ⇒ Object
- #_reduce_90(val, _values, result) ⇒ Object
- #_reduce_91(val, _values, result) ⇒ Object
- #_reduce_92(val, _values, result) ⇒ Object
- #_reduce_93(val, _values, result) ⇒ Object
- #_reduce_94(val, _values, result) ⇒ Object
-
#_reduce_97(val, _values, result) ⇒ Object
reduce 96 omitted.
- #_reduce_98(val, _values, result) ⇒ Object
- #_reduce_99(val, _values, result) ⇒ Object
- #_reduce_none(val, _values, result) ⇒ Object
- #add_block_pass(arglist, block) ⇒ Object
- #new___FILE__(tok) ⇒ Object
- #new___LINE__(tok) ⇒ Object
- #new_alias(kw, new, old) ⇒ Object
- #new_and(lhs, tok, rhs) ⇒ Object
- #new_args(norm, opt, rest, block) ⇒ Object
- #new_array(start, args, finish) ⇒ Object
- #new_assign(lhs, tok, rhs) ⇒ Object
- #new_assignable(ref) ⇒ Object
- #new_attrasgn(recv, op, args = []) ⇒ Object
- #new_binary_call(recv, meth, arg) ⇒ Object
- #new_block(stmt = nil) ⇒ Object
- #new_block_args(norm, opt, rest, block) ⇒ Object
- #new_block_pass(amper_tok, val) ⇒ Object
- #new_body(compstmt, res, els, ens) ⇒ Object
- #new_break(kw, args = nil) ⇒ Object
- #new_call(recv, meth, args = nil) ⇒ Object
- #new_class(start, path, sup, body, endt) ⇒ Object
- #new_colon2(lhs, tok, name) ⇒ Object
- #new_colon3(tok, name) ⇒ Object
- #new_compstmt(block) ⇒ Object
- #new_const(tok) ⇒ Object
- #new_cvar(tok) ⇒ Object
- #new_def(kw, recv, name, args, body, end_tok) ⇒ Object
- #new_dsym(str) ⇒ Object
- #new_erange(beg, op, finish) ⇒ Object
- #new_evstr(str) ⇒ Object
- #new_false(tok) ⇒ Object
- #new_float(tok) ⇒ Object
- #new_gettable(ref) ⇒ Object
- #new_gvar(tok) ⇒ Object
- #new_hash(open, assocs, close) ⇒ Object
- #new_ident(tok) ⇒ Object
- #new_if(if_tok, expr, stmt, tail) ⇒ Object
- #new_int(tok) ⇒ Object
- #new_irange(beg, op, finish) ⇒ Object
- #new_iter(args, body) ⇒ Object
- #new_ivar(tok) ⇒ Object
- #new_module(kw, path, body, end_tok) ⇒ Object
- #new_next(kw, args = []) ⇒ Object
- #new_nil(tok) ⇒ Object
- #new_not(kw, expr) ⇒ Object
- #new_op_asgn(op, lhs, rhs) ⇒ Object
- #new_op_asgn1(lhs, args, op, rhs) ⇒ Object
- #new_or(lhs, tok, rhs) ⇒ Object
- #new_paren(open, expr, close) ⇒ Object
- #new_regexp(reg, ending) ⇒ Object
- #new_rescue_mod(kw, expr, resc) ⇒ Object
- #new_return(kw, args = nil) ⇒ Object
- #new_sclass(kw, expr, body, end_tok) ⇒ Object
- #new_self(tok) ⇒ Object
- #new_splat(tok, value) ⇒ Object
- #new_str(str) ⇒ Object
- #new_str_content(tok) ⇒ Object
- #new_super(kw, args) ⇒ Object
- #new_sym(tok) ⇒ Object
- #new_true(tok) ⇒ Object
- #new_unary_call(op, recv) ⇒ Object
- #new_until(kw, test, body) ⇒ Object
- #new_var_ref(ref) ⇒ Object
- #new_while(kw, test, body) ⇒ Object
- #new_xstr(start_t, str, end_t) ⇒ Object
- #new_yield(args) ⇒ Object
- #next_token ⇒ Object
- #on_error(t, val, vstack) ⇒ Object
- #op_to_setter(op) ⇒ Object
- #parse(source, file = '(string)') ⇒ Object
- #parse_to_sexp ⇒ Object
- #pop_scope ⇒ Object
- #push_scope(type = nil) ⇒ Object
- #s(*parts) ⇒ Object
- #s0(type, source) ⇒ Object
- #s1(type, first, source) ⇒ Object
- #source(tok) ⇒ Object
- #str_append(str, str2) ⇒ Object
- #value(tok) ⇒ Object
Instance Attribute Details
#file ⇒ Object (readonly)
Returns the value of attribute file
9 10 11 |
# File 'opal/lib/opal/parser.rb', line 9 def file @file end |
#lexer ⇒ Object (readonly)
Returns the value of attribute lexer
9 10 11 |
# File 'opal/lib/opal/parser.rb', line 9 def lexer @lexer end |
#scope ⇒ Object (readonly)
Returns the value of attribute scope
9 10 11 |
# File 'opal/lib/opal/parser.rb', line 9 def scope @scope end |
Instance Method Details
#_reduce_10(val, _values, result) ⇒ Object
2988 2989 2990 2991 2992 |
# File 'opal/lib/opal/parser/grammar.rb', line 2988 def _reduce_10(val, _values, result) result = new_block result end |
#_reduce_103(val, _values, result) ⇒ Object
reduce 102 omitted
3412 3413 3414 3415 3416 3417 |
# File 'opal/lib/opal/parser/grammar.rb', line 3412 def _reduce_103(val, _values, result) lexer.lex_state = :expr_end result = val[0] result end |
#_reduce_104(val, _values, result) ⇒ Object
3419 3420 3421 3422 3423 3424 |
# File 'opal/lib/opal/parser/grammar.rb', line 3419 def _reduce_104(val, _values, result) lexer.lex_state = :expr_end result = val[0] result end |
#_reduce_105(val, _values, result) ⇒ Object
3426 3427 3428 3429 3430 |
# File 'opal/lib/opal/parser/grammar.rb', line 3426 def _reduce_105(val, _values, result) result = new_sym(val[0]) result end |
#_reduce_107(val, _values, result) ⇒ Object
reduce 106 omitted
3434 3435 3436 3437 3438 |
# File 'opal/lib/opal/parser/grammar.rb', line 3434 def _reduce_107(val, _values, result) result = s(:undef, val[0]) result end |
#_reduce_108(val, _values, result) ⇒ Object
3440 3441 3442 3443 3444 |
# File 'opal/lib/opal/parser/grammar.rb', line 3440 def _reduce_108(val, _values, result) result = val[0] << val[2] result end |
#_reduce_11(val, _values, result) ⇒ Object
2994 2995 2996 2997 2998 |
# File 'opal/lib/opal/parser/grammar.rb', line 2994 def _reduce_11(val, _values, result) result = new_block val[0] result end |
#_reduce_12(val, _values, result) ⇒ Object
3000 3001 3002 3003 3004 3005 |
# File 'opal/lib/opal/parser/grammar.rb', line 3000 def _reduce_12(val, _values, result) val[0] << val[2] result = val[0] result end |
#_reduce_13(val, _values, result) ⇒ Object
3007 3008 3009 3010 3011 |
# File 'opal/lib/opal/parser/grammar.rb', line 3007 def _reduce_13(val, _values, result) lexer.lex_state = :expr_fname result end |
#_reduce_14(val, _values, result) ⇒ Object
3013 3014 3015 3016 3017 |
# File 'opal/lib/opal/parser/grammar.rb', line 3013 def _reduce_14(val, _values, result) result = new_alias(val[0], val[1], val[3]) result end |
#_reduce_15(val, _values, result) ⇒ Object
3019 3020 3021 3022 3023 |
# File 'opal/lib/opal/parser/grammar.rb', line 3019 def _reduce_15(val, _values, result) result = s(:valias, value(val[1]).to_sym, value(val[2]).to_sym) result end |
#_reduce_17(val, _values, result) ⇒ Object
reduce 16 omitted
3027 3028 3029 3030 3031 |
# File 'opal/lib/opal/parser/grammar.rb', line 3027 def _reduce_17(val, _values, result) result = s(:valias, value(val[1]).to_sym, value(val[2]).to_sym) result end |
#_reduce_18(val, _values, result) ⇒ Object
3033 3034 3035 3036 3037 |
# File 'opal/lib/opal/parser/grammar.rb', line 3033 def _reduce_18(val, _values, result) result = val[1] result end |
#_reduce_183(val, _values, result) ⇒ Object
reduce 182 omitted
3594 3595 3596 3597 3598 |
# File 'opal/lib/opal/parser/grammar.rb', line 3594 def _reduce_183(val, _values, result) result = new_assign(val[0], val[1], val[2]) result end |
#_reduce_184(val, _values, result) ⇒ Object
3600 3601 3602 3603 3604 |
# File 'opal/lib/opal/parser/grammar.rb', line 3600 def _reduce_184(val, _values, result) result = new_assign val[0], val[1], s(:rescue_mod, val[2], val[4]) result end |
#_reduce_185(val, _values, result) ⇒ Object
3606 3607 3608 3609 3610 |
# File 'opal/lib/opal/parser/grammar.rb', line 3606 def _reduce_185(val, _values, result) result = new_op_asgn val[1], val[0], val[2] result end |
#_reduce_186(val, _values, result) ⇒ Object
3612 3613 3614 3615 3616 |
# File 'opal/lib/opal/parser/grammar.rb', line 3612 def _reduce_186(val, _values, result) result = new_op_asgn1(val[0], val[2], val[4], val[5]) result end |
#_reduce_187(val, _values, result) ⇒ Object
3618 3619 3620 3621 3622 |
# File 'opal/lib/opal/parser/grammar.rb', line 3618 def _reduce_187(val, _values, result) result = s(:op_asgn2, val[0], op_to_setter(val[2]), value(val[3]).to_sym, val[4]) result end |
#_reduce_19(val, _values, result) ⇒ Object
3039 3040 3041 3042 3043 |
# File 'opal/lib/opal/parser/grammar.rb', line 3039 def _reduce_19(val, _values, result) result = new_if(val[1], val[2], val[0], nil) result end |
#_reduce_193(val, _values, result) ⇒ Object
reduce 192 omitted
3634 3635 3636 3637 3638 |
# File 'opal/lib/opal/parser/grammar.rb', line 3634 def _reduce_193(val, _values, result) result = new_irange(val[0], val[1], val[2]) result end |
#_reduce_194(val, _values, result) ⇒ Object
3640 3641 3642 3643 3644 |
# File 'opal/lib/opal/parser/grammar.rb', line 3640 def _reduce_194(val, _values, result) result = new_erange(val[0], val[1], val[2]) result end |
#_reduce_195(val, _values, result) ⇒ Object
3646 3647 3648 3649 3650 |
# File 'opal/lib/opal/parser/grammar.rb', line 3646 def _reduce_195(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_196(val, _values, result) ⇒ Object
3652 3653 3654 3655 3656 |
# File 'opal/lib/opal/parser/grammar.rb', line 3652 def _reduce_196(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_197(val, _values, result) ⇒ Object
3658 3659 3660 3661 3662 |
# File 'opal/lib/opal/parser/grammar.rb', line 3658 def _reduce_197(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_198(val, _values, result) ⇒ Object
3664 3665 3666 3667 3668 |
# File 'opal/lib/opal/parser/grammar.rb', line 3664 def _reduce_198(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_199(val, _values, result) ⇒ Object
3670 3671 3672 3673 3674 |
# File 'opal/lib/opal/parser/grammar.rb', line 3670 def _reduce_199(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_2(val, _values, result) ⇒ Object
reduce 1 omitted
2943 2944 2945 2946 2947 |
# File 'opal/lib/opal/parser/grammar.rb', line 2943 def _reduce_2(val, _values, result) result = new_compstmt val[0] result end |
#_reduce_20(val, _values, result) ⇒ Object
3045 3046 3047 3048 3049 |
# File 'opal/lib/opal/parser/grammar.rb', line 3045 def _reduce_20(val, _values, result) result = new_if(val[1], val[2], nil, val[0]) result end |
#_reduce_200(val, _values, result) ⇒ Object
3676 3677 3678 3679 3680 |
# File 'opal/lib/opal/parser/grammar.rb', line 3676 def _reduce_200(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_203(val, _values, result) ⇒ Object
reduce 202 omitted
3686 3687 3688 3689 3690 3691 |
# File 'opal/lib/opal/parser/grammar.rb', line 3686 def _reduce_203(val, _values, result) result = new_call val[1], [:+@", []], [] result = val[1] if [:int, :float].include? val[1].type result end |
#_reduce_204(val, _values, result) ⇒ Object
3693 3694 3695 3696 3697 3698 3699 3700 3701 3702 3703 3704 |
# File 'opal/lib/opal/parser/grammar.rb', line 3693 def _reduce_204(val, _values, result) result = new_call val[1], [:-@", []], [] if val[1].type == :int val[1][1] = -val[1][1] result = val[1] elsif val[1].type == :float val[1][1] = -val[1][1].to_f result = val[1] end result end |
#_reduce_205(val, _values, result) ⇒ Object
3706 3707 3708 3709 3710 |
# File 'opal/lib/opal/parser/grammar.rb', line 3706 def _reduce_205(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_206(val, _values, result) ⇒ Object
3712 3713 3714 3715 3716 |
# File 'opal/lib/opal/parser/grammar.rb', line 3712 def _reduce_206(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_207(val, _values, result) ⇒ Object
3718 3719 3720 3721 3722 |
# File 'opal/lib/opal/parser/grammar.rb', line 3718 def _reduce_207(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_208(val, _values, result) ⇒ Object
3724 3725 3726 3727 3728 |
# File 'opal/lib/opal/parser/grammar.rb', line 3724 def _reduce_208(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_209(val, _values, result) ⇒ Object
3730 3731 3732 3733 3734 |
# File 'opal/lib/opal/parser/grammar.rb', line 3730 def _reduce_209(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_21(val, _values, result) ⇒ Object
3051 3052 3053 3054 3055 |
# File 'opal/lib/opal/parser/grammar.rb', line 3051 def _reduce_21(val, _values, result) result = new_while(val[1], val[2], val[0]) result end |
#_reduce_210(val, _values, result) ⇒ Object
3736 3737 3738 3739 3740 |
# File 'opal/lib/opal/parser/grammar.rb', line 3736 def _reduce_210(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_211(val, _values, result) ⇒ Object
3742 3743 3744 3745 3746 |
# File 'opal/lib/opal/parser/grammar.rb', line 3742 def _reduce_211(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_212(val, _values, result) ⇒ Object
3748 3749 3750 3751 3752 |
# File 'opal/lib/opal/parser/grammar.rb', line 3748 def _reduce_212(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_213(val, _values, result) ⇒ Object
3754 3755 3756 3757 3758 |
# File 'opal/lib/opal/parser/grammar.rb', line 3754 def _reduce_213(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_214(val, _values, result) ⇒ Object
3760 3761 3762 3763 3764 |
# File 'opal/lib/opal/parser/grammar.rb', line 3760 def _reduce_214(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_215(val, _values, result) ⇒ Object
3766 3767 3768 3769 3770 3771 |
# File 'opal/lib/opal/parser/grammar.rb', line 3766 def _reduce_215(val, _values, result) result = new_unary_call(['!', []], new_binary_call( val[0], ['==', []], val[2])) result end |
#_reduce_216(val, _values, result) ⇒ Object
3773 3774 3775 3776 3777 |
# File 'opal/lib/opal/parser/grammar.rb', line 3773 def _reduce_216(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_217(val, _values, result) ⇒ Object
3779 3780 3781 3782 3783 3784 |
# File 'opal/lib/opal/parser/grammar.rb', line 3779 def _reduce_217(val, _values, result) result = new_not(val[1], new_binary_call( val[0], ['=~', []], val[2])) result end |
#_reduce_218(val, _values, result) ⇒ Object
3786 3787 3788 3789 3790 |
# File 'opal/lib/opal/parser/grammar.rb', line 3786 def _reduce_218(val, _values, result) result = new_unary_call(val[0], val[1]) result end |
#_reduce_219(val, _values, result) ⇒ Object
3792 3793 3794 3795 3796 |
# File 'opal/lib/opal/parser/grammar.rb', line 3792 def _reduce_219(val, _values, result) result = new_unary_call(val[0], val[1]) result end |
#_reduce_22(val, _values, result) ⇒ Object
3057 3058 3059 3060 3061 |
# File 'opal/lib/opal/parser/grammar.rb', line 3057 def _reduce_22(val, _values, result) result = new_until(val[1], val[2], val[0]) result end |
#_reduce_220(val, _values, result) ⇒ Object
3798 3799 3800 3801 3802 |
# File 'opal/lib/opal/parser/grammar.rb', line 3798 def _reduce_220(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_221(val, _values, result) ⇒ Object
3804 3805 3806 3807 3808 |
# File 'opal/lib/opal/parser/grammar.rb', line 3804 def _reduce_221(val, _values, result) result = new_binary_call(val[0], val[1], val[2]) result end |
#_reduce_222(val, _values, result) ⇒ Object
3810 3811 3812 3813 3814 |
# File 'opal/lib/opal/parser/grammar.rb', line 3810 def _reduce_222(val, _values, result) result = new_and(val[0], val[1], val[2]) result end |
#_reduce_223(val, _values, result) ⇒ Object
3816 3817 3818 3819 3820 |
# File 'opal/lib/opal/parser/grammar.rb', line 3816 def _reduce_223(val, _values, result) result = new_or(val[0], val[1], val[2]) result end |
#_reduce_224(val, _values, result) ⇒ Object
3822 3823 3824 3825 3826 |
# File 'opal/lib/opal/parser/grammar.rb', line 3822 def _reduce_224(val, _values, result) result = s(:defined, val[2]) result end |
#_reduce_225(val, _values, result) ⇒ Object
3828 3829 3830 3831 3832 |
# File 'opal/lib/opal/parser/grammar.rb', line 3828 def _reduce_225(val, _values, result) result = new_if(val[1], val[0], val[2], val[4]) result end |
#_reduce_228(val, _values, result) ⇒ Object
reduce 227 omitted
3838 3839 3840 3841 3842 |
# File 'opal/lib/opal/parser/grammar.rb', line 3838 def _reduce_228(val, _values, result) result = nil result end |
#_reduce_229(val, _values, result) ⇒ Object
3844 3845 3846 3847 3848 |
# File 'opal/lib/opal/parser/grammar.rb', line 3844 def _reduce_229(val, _values, result) result = [val[0]] result end |
#_reduce_23(val, _values, result) ⇒ Object
3063 3064 3065 3066 3067 |
# File 'opal/lib/opal/parser/grammar.rb', line 3063 def _reduce_23(val, _values, result) result = new_rescue_mod(val[1], val[0], val[2]) result end |
#_reduce_230(val, _values, result) ⇒ Object
3850 3851 3852 3853 3854 |
# File 'opal/lib/opal/parser/grammar.rb', line 3850 def _reduce_230(val, _values, result) result = val[0] result end |
#_reduce_231(val, _values, result) ⇒ Object
3856 3857 3858 3859 3860 3861 |
# File 'opal/lib/opal/parser/grammar.rb', line 3856 def _reduce_231(val, _values, result) val[0] << s(:hash, *val[2]) result = val[0] result end |
#_reduce_232(val, _values, result) ⇒ Object
3863 3864 3865 3866 3867 |
# File 'opal/lib/opal/parser/grammar.rb', line 3863 def _reduce_232(val, _values, result) result = [s(:hash, *val[0])] result end |
#_reduce_233(val, _values, result) ⇒ Object
3869 3870 3871 3872 3873 |
# File 'opal/lib/opal/parser/grammar.rb', line 3869 def _reduce_233(val, _values, result) result = [] result end |
#_reduce_234(val, _values, result) ⇒ Object
3875 3876 3877 3878 3879 |
# File 'opal/lib/opal/parser/grammar.rb', line 3875 def _reduce_234(val, _values, result) result = val[1] result end |
#_reduce_237(val, _values, result) ⇒ Object
reduce 236 omitted
3885 3886 3887 3888 3889 |
# File 'opal/lib/opal/parser/grammar.rb', line 3885 def _reduce_237(val, _values, result) result = [] result end |
#_reduce_239(val, _values, result) ⇒ Object
reduce 238 omitted
3893 3894 3895 3896 3897 |
# File 'opal/lib/opal/parser/grammar.rb', line 3893 def _reduce_239(val, _values, result) result = [val[0]] result end |
#_reduce_240(val, _values, result) ⇒ Object
3899 3900 3901 3902 3903 3904 |
# File 'opal/lib/opal/parser/grammar.rb', line 3899 def _reduce_240(val, _values, result) result = val[0] add_block_pass val[0], val[1] result end |
#_reduce_241(val, _values, result) ⇒ Object
3906 3907 3908 3909 3910 3911 |
# File 'opal/lib/opal/parser/grammar.rb', line 3906 def _reduce_241(val, _values, result) result = [new_hash(nil, val[0], nil)] add_block_pass result, val[1] result end |
#_reduce_242(val, _values, result) ⇒ Object
3913 3914 3915 3916 3917 3918 |
# File 'opal/lib/opal/parser/grammar.rb', line 3913 def _reduce_242(val, _values, result) result = val[0] result << new_hash(nil, val[2], nil) result end |
#_reduce_243(val, _values, result) ⇒ Object
3920 3921 3922 3923 3924 3925 |
# File 'opal/lib/opal/parser/grammar.rb', line 3920 def _reduce_243(val, _values, result) result = [] add_block_pass result, val[0] result end |
#_reduce_246(val, _values, result) ⇒ Object
reduce 245 omitted
3931 3932 3933 3934 3935 |
# File 'opal/lib/opal/parser/grammar.rb', line 3931 def _reduce_246(val, _values, result) lexer.cmdarg_push 1 result end |
#_reduce_247(val, _values, result) ⇒ Object
3937 3938 3939 3940 3941 3942 |
# File 'opal/lib/opal/parser/grammar.rb', line 3937 def _reduce_247(val, _values, result) lexer.cmdarg_pop result = val[1] result end |
#_reduce_249(val, _values, result) ⇒ Object
reduce 248 omitted
3946 3947 3948 3949 3950 |
# File 'opal/lib/opal/parser/grammar.rb', line 3946 def _reduce_249(val, _values, result) result = nil result end |
#_reduce_25(val, _values, result) ⇒ Object
reduce 24 omitted
3071 3072 3073 3074 3075 |
# File 'opal/lib/opal/parser/grammar.rb', line 3071 def _reduce_25(val, _values, result) result = new_assign(val[0], val[1], val[2]) result end |
#_reduce_250(val, _values, result) ⇒ Object
3952 3953 3954 3955 3956 |
# File 'opal/lib/opal/parser/grammar.rb', line 3952 def _reduce_250(val, _values, result) result = val[1] result end |
#_reduce_251(val, _values, result) ⇒ Object
3958 3959 3960 3961 3962 |
# File 'opal/lib/opal/parser/grammar.rb', line 3958 def _reduce_251(val, _values, result) result = new_block_pass(val[0], val[1]) result end |
#_reduce_252(val, _values, result) ⇒ Object
3964 3965 3966 3967 3968 |
# File 'opal/lib/opal/parser/grammar.rb', line 3964 def _reduce_252(val, _values, result) result = val[1] result end |
#_reduce_253(val, _values, result) ⇒ Object
3970 3971 3972 3973 3974 |
# File 'opal/lib/opal/parser/grammar.rb', line 3970 def _reduce_253(val, _values, result) result = nil result end |
#_reduce_254(val, _values, result) ⇒ Object
3976 3977 3978 3979 3980 |
# File 'opal/lib/opal/parser/grammar.rb', line 3976 def _reduce_254(val, _values, result) result = [val[0]] result end |
#_reduce_255(val, _values, result) ⇒ Object
3982 3983 3984 3985 3986 |
# File 'opal/lib/opal/parser/grammar.rb', line 3982 def _reduce_255(val, _values, result) result = [new_splat(val[0], val[1])] result end |
#_reduce_256(val, _values, result) ⇒ Object
3988 3989 3990 3991 3992 |
# File 'opal/lib/opal/parser/grammar.rb', line 3988 def _reduce_256(val, _values, result) result = val[0] << val[2] result end |
#_reduce_257(val, _values, result) ⇒ Object
3994 3995 3996 3997 3998 |
# File 'opal/lib/opal/parser/grammar.rb', line 3994 def _reduce_257(val, _values, result) result = val[0] << new_splat(val[2], val[3]) result end |
#_reduce_258(val, _values, result) ⇒ Object
4000 4001 4002 4003 4004 4005 |
# File 'opal/lib/opal/parser/grammar.rb', line 4000 def _reduce_258(val, _values, result) val[0] << val[2] result = s(:array, *val[0]) result end |
#_reduce_259(val, _values, result) ⇒ Object
4007 4008 4009 4010 4011 4012 |
# File 'opal/lib/opal/parser/grammar.rb', line 4007 def _reduce_259(val, _values, result) val[0] << s(:splat, val[3]) result = s(:array, *val[0]) result end |
#_reduce_26(val, _values, result) ⇒ Object
3077 3078 3079 3080 3081 |
# File 'opal/lib/opal/parser/grammar.rb', line 3077 def _reduce_26(val, _values, result) result = s(:masgn, val[0], s(:to_ary, val[2])) result end |
#_reduce_260(val, _values, result) ⇒ Object
4014 4015 4016 4017 4018 |
# File 'opal/lib/opal/parser/grammar.rb', line 4014 def _reduce_260(val, _values, result) result = s(:splat, val[1]) result end |
#_reduce_27(val, _values, result) ⇒ Object
3083 3084 3085 3086 3087 |
# File 'opal/lib/opal/parser/grammar.rb', line 3083 def _reduce_27(val, _values, result) result = new_op_asgn val[1], val[0], val[2] result end |
#_reduce_270(val, _values, result) ⇒ Object
reduce 269 omitted
4038 4039 4040 4041 4042 |
# File 'opal/lib/opal/parser/grammar.rb', line 4038 def _reduce_270(val, _values, result) result = lexer.line result end |
#_reduce_271(val, _values, result) ⇒ Object
4044 4045 4046 4047 4048 |
# File 'opal/lib/opal/parser/grammar.rb', line 4044 def _reduce_271(val, _values, result) result = s(:begin, val[2]) result end |
#_reduce_272(val, _values, result) ⇒ Object
4050 4051 4052 4053 4054 |
# File 'opal/lib/opal/parser/grammar.rb', line 4050 def _reduce_272(val, _values, result) result = val[1] result end |
#_reduce_273(val, _values, result) ⇒ Object
4056 4057 4058 4059 4060 |
# File 'opal/lib/opal/parser/grammar.rb', line 4056 def _reduce_273(val, _values, result) result = new_paren(val[0], val[1], val[2]) result end |
#_reduce_274(val, _values, result) ⇒ Object
4062 4063 4064 4065 4066 |
# File 'opal/lib/opal/parser/grammar.rb', line 4062 def _reduce_274(val, _values, result) result = new_colon2(val[0], val[1], val[2]) result end |
#_reduce_275(val, _values, result) ⇒ Object
4068 4069 4070 4071 4072 |
# File 'opal/lib/opal/parser/grammar.rb', line 4068 def _reduce_275(val, _values, result) result = new_colon3(val[0], val[1]) result end |
#_reduce_276(val, _values, result) ⇒ Object
4074 4075 4076 4077 4078 |
# File 'opal/lib/opal/parser/grammar.rb', line 4074 def _reduce_276(val, _values, result) result = new_call val[0], [:[], []], val[2] result end |
#_reduce_277(val, _values, result) ⇒ Object
4080 4081 4082 4083 4084 |
# File 'opal/lib/opal/parser/grammar.rb', line 4080 def _reduce_277(val, _values, result) result = new_array(val[0], val[1], val[2]) result end |
#_reduce_278(val, _values, result) ⇒ Object
4086 4087 4088 4089 4090 |
# File 'opal/lib/opal/parser/grammar.rb', line 4086 def _reduce_278(val, _values, result) result = new_hash(val[0], val[1], val[2]) result end |
#_reduce_279(val, _values, result) ⇒ Object
4092 4093 4094 4095 4096 |
# File 'opal/lib/opal/parser/grammar.rb', line 4092 def _reduce_279(val, _values, result) result = new_return(val[0]) result end |
#_reduce_280(val, _values, result) ⇒ Object
4098 4099 4100 4101 4102 |
# File 'opal/lib/opal/parser/grammar.rb', line 4098 def _reduce_280(val, _values, result) result = new_yield val[2] result end |
#_reduce_281(val, _values, result) ⇒ Object
4104 4105 4106 4107 4108 |
# File 'opal/lib/opal/parser/grammar.rb', line 4104 def _reduce_281(val, _values, result) result = s(:yield) result end |
#_reduce_282(val, _values, result) ⇒ Object
4110 4111 4112 4113 4114 |
# File 'opal/lib/opal/parser/grammar.rb', line 4110 def _reduce_282(val, _values, result) result = s(:yield) result end |
#_reduce_283(val, _values, result) ⇒ Object
4116 4117 4118 4119 4120 |
# File 'opal/lib/opal/parser/grammar.rb', line 4116 def _reduce_283(val, _values, result) result = s(:defined, val[3]) result end |
#_reduce_284(val, _values, result) ⇒ Object
4122 4123 4124 4125 4126 |
# File 'opal/lib/opal/parser/grammar.rb', line 4122 def _reduce_284(val, _values, result) result = new_unary_call(['!', []], val[2]) result end |
#_reduce_285(val, _values, result) ⇒ Object
4128 4129 4130 4131 4132 |
# File 'opal/lib/opal/parser/grammar.rb', line 4128 def _reduce_285(val, _values, result) result = new_unary_call(['!', []], new_nil(val[0])) result end |
#_reduce_286(val, _values, result) ⇒ Object
4134 4135 4136 4137 4138 4139 |
# File 'opal/lib/opal/parser/grammar.rb', line 4134 def _reduce_286(val, _values, result) result = new_call(nil, val[0], []) result << val[1] result end |
#_reduce_288(val, _values, result) ⇒ Object
reduce 287 omitted
4143 4144 4145 4146 4147 4148 |
# File 'opal/lib/opal/parser/grammar.rb', line 4143 def _reduce_288(val, _values, result) val[0] << val[1] result = val[0] result end |
#_reduce_289(val, _values, result) ⇒ Object
4150 4151 4152 4153 4154 |
# File 'opal/lib/opal/parser/grammar.rb', line 4150 def _reduce_289(val, _values, result) result = val[1] result end |
#_reduce_29(val, _values, result) ⇒ Object
reduce 28 omitted
3091 3092 3093 3094 3095 |
# File 'opal/lib/opal/parser/grammar.rb', line 3091 def _reduce_29(val, _values, result) result = s(:op_asgn2, val[0], op_to_setter(val[2]), value(val[3]).to_sym, val[4]) result end |
#_reduce_290(val, _values, result) ⇒ Object
4156 4157 4158 4159 4160 |
# File 'opal/lib/opal/parser/grammar.rb', line 4156 def _reduce_290(val, _values, result) result = new_if(val[0], val[1], val[3], val[4]) result end |
#_reduce_291(val, _values, result) ⇒ Object
4162 4163 4164 4165 4166 |
# File 'opal/lib/opal/parser/grammar.rb', line 4162 def _reduce_291(val, _values, result) result = new_if(val[0], val[1], val[4], val[3]) result end |
#_reduce_292(val, _values, result) ⇒ Object
4168 4169 4170 4171 4172 4173 |
# File 'opal/lib/opal/parser/grammar.rb', line 4168 def _reduce_292(val, _values, result) lexer.cond_push 1 result = lexer.line result end |
#_reduce_293(val, _values, result) ⇒ Object
4175 4176 4177 4178 4179 |
# File 'opal/lib/opal/parser/grammar.rb', line 4175 def _reduce_293(val, _values, result) lexer.cond_pop result end |
#_reduce_294(val, _values, result) ⇒ Object
4181 4182 4183 4184 4185 |
# File 'opal/lib/opal/parser/grammar.rb', line 4181 def _reduce_294(val, _values, result) result = s(:while, val[2], val[5]) result end |
#_reduce_295(val, _values, result) ⇒ Object
4187 4188 4189 4190 4191 4192 |
# File 'opal/lib/opal/parser/grammar.rb', line 4187 def _reduce_295(val, _values, result) lexer.cond_push 1 result = lexer.line result end |
#_reduce_296(val, _values, result) ⇒ Object
4194 4195 4196 4197 4198 |
# File 'opal/lib/opal/parser/grammar.rb', line 4194 def _reduce_296(val, _values, result) lexer.cond_pop result end |
#_reduce_297(val, _values, result) ⇒ Object
4200 4201 4202 4203 4204 |
# File 'opal/lib/opal/parser/grammar.rb', line 4200 def _reduce_297(val, _values, result) result = s(:until, val[2], val[5]) result end |
#_reduce_298(val, _values, result) ⇒ Object
4206 4207 4208 4209 4210 |
# File 'opal/lib/opal/parser/grammar.rb', line 4206 def _reduce_298(val, _values, result) result = s(:case, val[1], *val[3]) result end |
#_reduce_299(val, _values, result) ⇒ Object
4212 4213 4214 4215 4216 |
# File 'opal/lib/opal/parser/grammar.rb', line 4212 def _reduce_299(val, _values, result) result = s(:case, nil, *val[2]) result end |
#_reduce_3(val, _values, result) ⇒ Object
2949 2950 2951 2952 2953 |
# File 'opal/lib/opal/parser/grammar.rb', line 2949 def _reduce_3(val, _values, result) result = new_block result end |
#_reduce_300(val, _values, result) ⇒ Object
4218 4219 4220 4221 4222 |
# File 'opal/lib/opal/parser/grammar.rb', line 4218 def _reduce_300(val, _values, result) result = s(:case, nil, val[3]) result end |
#_reduce_301(val, _values, result) ⇒ Object
4224 4225 4226 4227 4228 |
# File 'opal/lib/opal/parser/grammar.rb', line 4224 def _reduce_301(val, _values, result) # ... result end |
#_reduce_302(val, _values, result) ⇒ Object
4230 4231 4232 4233 4234 |
# File 'opal/lib/opal/parser/grammar.rb', line 4230 def _reduce_302(val, _values, result) # ... result end |
#_reduce_304(val, _values, result) ⇒ Object
reduce 303 omitted
4238 4239 4240 4241 4242 |
# File 'opal/lib/opal/parser/grammar.rb', line 4238 def _reduce_304(val, _values, result) # ... result end |
#_reduce_305(val, _values, result) ⇒ Object
4244 4245 4246 4247 4248 |
# File 'opal/lib/opal/parser/grammar.rb', line 4244 def _reduce_305(val, _values, result) result = new_class val[0], val[1], val[2], val[4], val[5] result end |
#_reduce_306(val, _values, result) ⇒ Object
4250 4251 4252 4253 4254 |
# File 'opal/lib/opal/parser/grammar.rb', line 4250 def _reduce_306(val, _values, result) result = lexer.line result end |
#_reduce_307(val, _values, result) ⇒ Object
4256 4257 4258 4259 4260 |
# File 'opal/lib/opal/parser/grammar.rb', line 4256 def _reduce_307(val, _values, result) # ... result end |
#_reduce_308(val, _values, result) ⇒ Object
4262 4263 4264 4265 4266 |
# File 'opal/lib/opal/parser/grammar.rb', line 4262 def _reduce_308(val, _values, result) result = new_sclass(val[0], val[3], val[6], val[7]) result end |
#_reduce_309(val, _values, result) ⇒ Object
4268 4269 4270 4271 4272 |
# File 'opal/lib/opal/parser/grammar.rb', line 4268 def _reduce_309(val, _values, result) result = lexer.line result end |
#_reduce_310(val, _values, result) ⇒ Object
4274 4275 4276 4277 4278 |
# File 'opal/lib/opal/parser/grammar.rb', line 4274 def _reduce_310(val, _values, result) # ... result end |
#_reduce_311(val, _values, result) ⇒ Object
4280 4281 4282 4283 4284 |
# File 'opal/lib/opal/parser/grammar.rb', line 4280 def _reduce_311(val, _values, result) result = new_module(val[0], val[2], val[4], val[5]) result end |
#_reduce_312(val, _values, result) ⇒ Object
4286 4287 4288 4289 4290 |
# File 'opal/lib/opal/parser/grammar.rb', line 4286 def _reduce_312(val, _values, result) push_scope result end |
#_reduce_313(val, _values, result) ⇒ Object
4292 4293 4294 4295 4296 4297 |
# File 'opal/lib/opal/parser/grammar.rb', line 4292 def _reduce_313(val, _values, result) result = new_def(val[0], nil, val[1], val[3], val[4], val[5]) pop_scope result end |
#_reduce_314(val, _values, result) ⇒ Object
4299 4300 4301 4302 4303 |
# File 'opal/lib/opal/parser/grammar.rb', line 4299 def _reduce_314(val, _values, result) lexer.lex_state = :expr_fname result end |
#_reduce_315(val, _values, result) ⇒ Object
4305 4306 4307 4308 4309 |
# File 'opal/lib/opal/parser/grammar.rb', line 4305 def _reduce_315(val, _values, result) push_scope result end |
#_reduce_316(val, _values, result) ⇒ Object
4311 4312 4313 4314 4315 4316 |
# File 'opal/lib/opal/parser/grammar.rb', line 4311 def _reduce_316(val, _values, result) result = new_def(val[0], val[1], val[4], val[6], val[7], val[8]) pop_scope result end |
#_reduce_317(val, _values, result) ⇒ Object
4318 4319 4320 4321 4322 |
# File 'opal/lib/opal/parser/grammar.rb', line 4318 def _reduce_317(val, _values, result) result = new_break(val[0]) result end |
#_reduce_318(val, _values, result) ⇒ Object
4324 4325 4326 4327 4328 |
# File 'opal/lib/opal/parser/grammar.rb', line 4324 def _reduce_318(val, _values, result) result = s(:next) result end |
#_reduce_319(val, _values, result) ⇒ Object
4330 4331 4332 4333 4334 |
# File 'opal/lib/opal/parser/grammar.rb', line 4330 def _reduce_319(val, _values, result) result = s(:redo) result end |
#_reduce_329(val, _values, result) ⇒ Object
reduce 328 omitted
4354 4355 4356 4357 4358 4359 |
# File 'opal/lib/opal/parser/grammar.rb', line 4354 def _reduce_329(val, _values, result) result = new_call nil, [:lambda, []], [] result << new_iter(val[0], val[1]) result end |
#_reduce_33(val, _values, result) ⇒ Object
reduce 32 omitted
3103 3104 3105 3106 3107 |
# File 'opal/lib/opal/parser/grammar.rb', line 3103 def _reduce_33(val, _values, result) result = new_assign val[0], val[1], s(:svalue, val[2]) result end |
#_reduce_330(val, _values, result) ⇒ Object
4361 4362 4363 4364 4365 |
# File 'opal/lib/opal/parser/grammar.rb', line 4361 def _reduce_330(val, _values, result) result = val[1] result end |
#_reduce_331(val, _values, result) ⇒ Object
4367 4368 4369 4370 4371 |
# File 'opal/lib/opal/parser/grammar.rb', line 4367 def _reduce_331(val, _values, result) result = nil result end |
#_reduce_334(val, _values, result) ⇒ Object
reduce 333 omitted
4377 4378 4379 4380 4381 |
# File 'opal/lib/opal/parser/grammar.rb', line 4377 def _reduce_334(val, _values, result) result = val[1] result end |
#_reduce_335(val, _values, result) ⇒ Object
4383 4384 4385 4386 4387 |
# File 'opal/lib/opal/parser/grammar.rb', line 4383 def _reduce_335(val, _values, result) result = val[1] result end |
#_reduce_336(val, _values, result) ⇒ Object
4389 4390 4391 4392 4393 |
# File 'opal/lib/opal/parser/grammar.rb', line 4389 def _reduce_336(val, _values, result) result = val[0] result end |
#_reduce_337(val, _values, result) ⇒ Object
4395 4396 4397 4398 4399 |
# File 'opal/lib/opal/parser/grammar.rb', line 4395 def _reduce_337(val, _values, result) result = new_if(val[0], val[1], val[3], val[4]) result end |
#_reduce_339(val, _values, result) ⇒ Object
reduce 338 omitted
4403 4404 4405 4406 4407 |
# File 'opal/lib/opal/parser/grammar.rb', line 4403 def _reduce_339(val, _values, result) result = val[1] result end |
#_reduce_34(val, _values, result) ⇒ Object
3109 3110 3111 3112 3113 |
# File 'opal/lib/opal/parser/grammar.rb', line 3109 def _reduce_34(val, _values, result) result = s(:masgn, val[0], s(:to_ary, val[2])) result end |
#_reduce_340(val, _values, result) ⇒ Object
4409 4410 4411 4412 4413 |
# File 'opal/lib/opal/parser/grammar.rb', line 4409 def _reduce_340(val, _values, result) result = s(:block, val[0]) result end |
#_reduce_341(val, _values, result) ⇒ Object
4415 4416 4417 4418 4419 4420 |
# File 'opal/lib/opal/parser/grammar.rb', line 4415 def _reduce_341(val, _values, result) val[0] << val[2] result = val[0] result end |
#_reduce_342(val, _values, result) ⇒ Object
4422 4423 4424 4425 4426 4427 |
# File 'opal/lib/opal/parser/grammar.rb', line 4422 def _reduce_342(val, _values, result) result = new_assign(new_assignable(new_ident( val[0])), val[1], val[2]) result end |
#_reduce_344(val, _values, result) ⇒ Object
reduce 343 omitted
4431 4432 4433 4434 4435 |
# File 'opal/lib/opal/parser/grammar.rb', line 4431 def _reduce_344(val, _values, result) result = nil result end |
#_reduce_345(val, _values, result) ⇒ Object
4437 4438 4439 4440 4441 |
# File 'opal/lib/opal/parser/grammar.rb', line 4437 def _reduce_345(val, _values, result) result = nil result end |
#_reduce_346(val, _values, result) ⇒ Object
4443 4444 4445 4446 4447 |
# File 'opal/lib/opal/parser/grammar.rb', line 4443 def _reduce_346(val, _values, result) result = val[1] result end |
#_reduce_347(val, _values, result) ⇒ Object
4449 4450 4451 4452 4453 |
# File 'opal/lib/opal/parser/grammar.rb', line 4449 def _reduce_347(val, _values, result) result = val[0] result end |
#_reduce_348(val, _values, result) ⇒ Object
4455 4456 4457 4458 4459 |
# File 'opal/lib/opal/parser/grammar.rb', line 4455 def _reduce_348(val, _values, result) result = val[1] result end |
#_reduce_349(val, _values, result) ⇒ Object
4461 4462 4463 4464 4465 |
# File 'opal/lib/opal/parser/grammar.rb', line 4461 def _reduce_349(val, _values, result) nil result end |
#_reduce_35(val, _values, result) ⇒ Object
3115 3116 3117 3118 3119 |
# File 'opal/lib/opal/parser/grammar.rb', line 3115 def _reduce_35(val, _values, result) result = s(:masgn, val[0], val[2]) result end |
#_reduce_350(val, _values, result) ⇒ Object
4467 4468 4469 4470 4471 |
# File 'opal/lib/opal/parser/grammar.rb', line 4467 def _reduce_350(val, _values, result) result = new_block_args(val[0], val[2], val[4], val[5]) result end |
#_reduce_351(val, _values, result) ⇒ Object
4473 4474 4475 4476 4477 |
# File 'opal/lib/opal/parser/grammar.rb', line 4473 def _reduce_351(val, _values, result) result = new_block_args(val[0], val[2], nil, val[3]) result end |
#_reduce_352(val, _values, result) ⇒ Object
4479 4480 4481 4482 4483 |
# File 'opal/lib/opal/parser/grammar.rb', line 4479 def _reduce_352(val, _values, result) result = new_block_args(val[0], nil, val[2], val[3]) result end |
#_reduce_353(val, _values, result) ⇒ Object
4485 4486 4487 4488 4489 |
# File 'opal/lib/opal/parser/grammar.rb', line 4485 def _reduce_353(val, _values, result) result = new_block_args(val[0], nil, nil, nil) result end |
#_reduce_354(val, _values, result) ⇒ Object
4491 4492 4493 4494 4495 |
# File 'opal/lib/opal/parser/grammar.rb', line 4491 def _reduce_354(val, _values, result) result = new_block_args(val[0], nil, nil, val[1]) result end |
#_reduce_355(val, _values, result) ⇒ Object
4497 4498 4499 4500 4501 |
# File 'opal/lib/opal/parser/grammar.rb', line 4497 def _reduce_355(val, _values, result) result = new_block_args(nil, val[0], val[2], val[3]) result end |
#_reduce_356(val, _values, result) ⇒ Object
4503 4504 4505 4506 4507 |
# File 'opal/lib/opal/parser/grammar.rb', line 4503 def _reduce_356(val, _values, result) result = new_block_args(nil, val[0], nil, val[1]) result end |
#_reduce_357(val, _values, result) ⇒ Object
4509 4510 4511 4512 4513 |
# File 'opal/lib/opal/parser/grammar.rb', line 4509 def _reduce_357(val, _values, result) result = new_block_args(nil, nil, val[0], val[1]) result end |
#_reduce_358(val, _values, result) ⇒ Object
4515 4516 4517 4518 4519 |
# File 'opal/lib/opal/parser/grammar.rb', line 4515 def _reduce_358(val, _values, result) result = new_block_args(nil, nil, nil, val[0]) result end |
#_reduce_359(val, _values, result) ⇒ Object
4521 4522 4523 4524 4525 4526 |
# File 'opal/lib/opal/parser/grammar.rb', line 4521 def _reduce_359(val, _values, result) push_scope :block result = lexer.line result end |
#_reduce_360(val, _values, result) ⇒ Object
4528 4529 4530 4531 4532 4533 |
# File 'opal/lib/opal/parser/grammar.rb', line 4528 def _reduce_360(val, _values, result) result = new_iter val[2], val[3] pop_scope result end |
#_reduce_361(val, _values, result) ⇒ Object
4535 4536 4537 4538 4539 4540 |
# File 'opal/lib/opal/parser/grammar.rb', line 4535 def _reduce_361(val, _values, result) val[0] << val[1] result = val[0] result end |
#_reduce_364(val, _values, result) ⇒ Object
reduce 363 omitted
4546 4547 4548 4549 4550 |
# File 'opal/lib/opal/parser/grammar.rb', line 4546 def _reduce_364(val, _values, result) result = new_call(nil, val[0], val[1]) result end |
#_reduce_365(val, _values, result) ⇒ Object
4552 4553 4554 4555 4556 |
# File 'opal/lib/opal/parser/grammar.rb', line 4552 def _reduce_365(val, _values, result) result = new_call(val[0], val[2], val[3]) result end |
#_reduce_366(val, _values, result) ⇒ Object
4558 4559 4560 4561 4562 |
# File 'opal/lib/opal/parser/grammar.rb', line 4558 def _reduce_366(val, _values, result) result = new_call(val[0], [:call, []], val[2]) result end |
#_reduce_367(val, _values, result) ⇒ Object
4564 4565 4566 4567 4568 |
# File 'opal/lib/opal/parser/grammar.rb', line 4564 def _reduce_367(val, _values, result) result = new_call(val[0], val[2], val[3]) result end |
#_reduce_368(val, _values, result) ⇒ Object
4570 4571 4572 4573 4574 |
# File 'opal/lib/opal/parser/grammar.rb', line 4570 def _reduce_368(val, _values, result) result = new_call(val[0], val[2]) result end |
#_reduce_369(val, _values, result) ⇒ Object
4576 4577 4578 4579 4580 |
# File 'opal/lib/opal/parser/grammar.rb', line 4576 def _reduce_369(val, _values, result) result = new_super(val[0], val[1]) result end |
#_reduce_370(val, _values, result) ⇒ Object
4582 4583 4584 4585 4586 |
# File 'opal/lib/opal/parser/grammar.rb', line 4582 def _reduce_370(val, _values, result) result = new_super(val[0], nil) result end |
#_reduce_371(val, _values, result) ⇒ Object
4588 4589 4590 4591 4592 4593 |
# File 'opal/lib/opal/parser/grammar.rb', line 4588 def _reduce_371(val, _values, result) push_scope :block result = lexer.line result end |
#_reduce_372(val, _values, result) ⇒ Object
4595 4596 4597 4598 4599 4600 |
# File 'opal/lib/opal/parser/grammar.rb', line 4595 def _reduce_372(val, _values, result) result = new_iter val[2], val[3] pop_scope result end |
#_reduce_373(val, _values, result) ⇒ Object
4602 4603 4604 4605 4606 4607 |
# File 'opal/lib/opal/parser/grammar.rb', line 4602 def _reduce_373(val, _values, result) push_scope :block result = lexer.line result end |
#_reduce_374(val, _values, result) ⇒ Object
4609 4610 4611 4612 4613 4614 |
# File 'opal/lib/opal/parser/grammar.rb', line 4609 def _reduce_374(val, _values, result) result = new_iter val[2], val[3] pop_scope result end |
#_reduce_375(val, _values, result) ⇒ Object
4616 4617 4618 4619 4620 |
# File 'opal/lib/opal/parser/grammar.rb', line 4616 def _reduce_375(val, _values, result) result = lexer.line result end |
#_reduce_376(val, _values, result) ⇒ Object
4622 4623 4624 4625 4626 4627 4628 |
# File 'opal/lib/opal/parser/grammar.rb', line 4622 def _reduce_376(val, _values, result) part = s(:when, s(:array, *val[2]), val[4]) result = [part] result.push *val[5] if val[5] result end |
#_reduce_377(val, _values, result) ⇒ Object
4630 4631 4632 4633 4634 |
# File 'opal/lib/opal/parser/grammar.rb', line 4630 def _reduce_377(val, _values, result) result = [val[0]] result end |
#_reduce_379(val, _values, result) ⇒ Object
reduce 378 omitted
4638 4639 4640 4641 4642 4643 4644 4645 |
# File 'opal/lib/opal/parser/grammar.rb', line 4638 def _reduce_379(val, _values, result) exc = val[1] || s(:array) exc << new_assign(val[2], val[2], s(:gvar, '$!'.intern)) if val[2] result = [s(:resbody, exc, val[4])] result.push val[5].first if val[5] result end |
#_reduce_38(val, _values, result) ⇒ Object
reduce 37 omitted
3125 3126 3127 3128 3129 |
# File 'opal/lib/opal/parser/grammar.rb', line 3125 def _reduce_38(val, _values, result) result = s(:and, val[0], val[2]) result end |
#_reduce_380(val, _values, result) ⇒ Object
4647 4648 4649 4650 4651 |
# File 'opal/lib/opal/parser/grammar.rb', line 4647 def _reduce_380(val, _values, result) result = nil result end |
#_reduce_381(val, _values, result) ⇒ Object
4653 4654 4655 4656 4657 |
# File 'opal/lib/opal/parser/grammar.rb', line 4653 def _reduce_381(val, _values, result) result = s(:array, val[0]) result end |
#_reduce_384(val, _values, result) ⇒ Object
reduce 383 omitted
4663 4664 4665 4666 4667 |
# File 'opal/lib/opal/parser/grammar.rb', line 4663 def _reduce_384(val, _values, result) result = val[1] result end |
#_reduce_385(val, _values, result) ⇒ Object
4669 4670 4671 4672 4673 |
# File 'opal/lib/opal/parser/grammar.rb', line 4669 def _reduce_385(val, _values, result) result = nil result end |
#_reduce_386(val, _values, result) ⇒ Object
4675 4676 4677 4678 4679 |
# File 'opal/lib/opal/parser/grammar.rb', line 4675 def _reduce_386(val, _values, result) result = val[1].nil? ? s(:nil) : val[1] result end |
#_reduce_39(val, _values, result) ⇒ Object
3131 3132 3133 3134 3135 |
# File 'opal/lib/opal/parser/grammar.rb', line 3131 def _reduce_39(val, _values, result) result = s(:or, val[0], val[2]) result end |
#_reduce_391(val, _values, result) ⇒ Object
reduce 390 omitted
4689 4690 4691 4692 4693 |
# File 'opal/lib/opal/parser/grammar.rb', line 4689 def _reduce_391(val, _values, result) result = new_str val[0] result end |
#_reduce_394(val, _values, result) ⇒ Object
reduce 393 omitted
4699 4700 4701 4702 4703 |
# File 'opal/lib/opal/parser/grammar.rb', line 4699 def _reduce_394(val, _values, result) result = val[1] result end |
#_reduce_395(val, _values, result) ⇒ Object
4705 4706 4707 4708 4709 |
# File 'opal/lib/opal/parser/grammar.rb', line 4705 def _reduce_395(val, _values, result) result = s(:str, value(val[0])) result end |
#_reduce_396(val, _values, result) ⇒ Object
4711 4712 4713 4714 4715 |
# File 'opal/lib/opal/parser/grammar.rb', line 4711 def _reduce_396(val, _values, result) result = new_xstr(val[0], val[1], val[2]) result end |
#_reduce_397(val, _values, result) ⇒ Object
4717 4718 4719 4720 4721 |
# File 'opal/lib/opal/parser/grammar.rb', line 4717 def _reduce_397(val, _values, result) result = new_regexp val[1], val[2] result end |
#_reduce_398(val, _values, result) ⇒ Object
4723 4724 4725 4726 4727 |
# File 'opal/lib/opal/parser/grammar.rb', line 4723 def _reduce_398(val, _values, result) result = s(:array) result end |
#_reduce_399(val, _values, result) ⇒ Object
4729 4730 4731 4732 4733 |
# File 'opal/lib/opal/parser/grammar.rb', line 4729 def _reduce_399(val, _values, result) result = val[1] result end |
#_reduce_4(val, _values, result) ⇒ Object
2955 2956 2957 2958 2959 |
# File 'opal/lib/opal/parser/grammar.rb', line 2955 def _reduce_4(val, _values, result) result = new_block val[0] result end |
#_reduce_40(val, _values, result) ⇒ Object
3137 3138 3139 3140 3141 |
# File 'opal/lib/opal/parser/grammar.rb', line 3137 def _reduce_40(val, _values, result) result = new_unary_call(['!', []], val[1]) result end |
#_reduce_400(val, _values, result) ⇒ Object
4735 4736 4737 4738 4739 |
# File 'opal/lib/opal/parser/grammar.rb', line 4735 def _reduce_400(val, _values, result) result = s(:array) result end |
#_reduce_401(val, _values, result) ⇒ Object
4741 4742 4743 4744 4745 4746 4747 |
# File 'opal/lib/opal/parser/grammar.rb', line 4741 def _reduce_401(val, _values, result) part = val[1] part = s(:dstr, "", val[1]) if part.type == :evstr result = val[0] << part result end |
#_reduce_402(val, _values, result) ⇒ Object
4749 4750 4751 4752 4753 |
# File 'opal/lib/opal/parser/grammar.rb', line 4749 def _reduce_402(val, _values, result) result = val[0] result end |
#_reduce_403(val, _values, result) ⇒ Object
4755 4756 4757 4758 4759 |
# File 'opal/lib/opal/parser/grammar.rb', line 4755 def _reduce_403(val, _values, result) result = val[0].concat([val[1]]) result end |
#_reduce_404(val, _values, result) ⇒ Object
4761 4762 4763 4764 4765 |
# File 'opal/lib/opal/parser/grammar.rb', line 4761 def _reduce_404(val, _values, result) result = s(:array) result end |
#_reduce_405(val, _values, result) ⇒ Object
4767 4768 4769 4770 4771 |
# File 'opal/lib/opal/parser/grammar.rb', line 4767 def _reduce_405(val, _values, result) result = val[1] result end |
#_reduce_406(val, _values, result) ⇒ Object
4773 4774 4775 4776 4777 |
# File 'opal/lib/opal/parser/grammar.rb', line 4773 def _reduce_406(val, _values, result) result = s(:array) result end |
#_reduce_407(val, _values, result) ⇒ Object
4779 4780 4781 4782 4783 |
# File 'opal/lib/opal/parser/grammar.rb', line 4779 def _reduce_407(val, _values, result) result = val[0] << s(:str, value(val[1])) result end |
#_reduce_408(val, _values, result) ⇒ Object
4785 4786 4787 4788 4789 |
# File 'opal/lib/opal/parser/grammar.rb', line 4785 def _reduce_408(val, _values, result) result = nil result end |
#_reduce_409(val, _values, result) ⇒ Object
4791 4792 4793 4794 4795 |
# File 'opal/lib/opal/parser/grammar.rb', line 4791 def _reduce_409(val, _values, result) result = str_append val[0], val[1] result end |
#_reduce_41(val, _values, result) ⇒ Object
3143 3144 3145 3146 3147 |
# File 'opal/lib/opal/parser/grammar.rb', line 3143 def _reduce_41(val, _values, result) result = new_unary_call(val[0], val[1]) result end |
#_reduce_410(val, _values, result) ⇒ Object
4797 4798 4799 4800 4801 |
# File 'opal/lib/opal/parser/grammar.rb', line 4797 def _reduce_410(val, _values, result) result = nil result end |
#_reduce_411(val, _values, result) ⇒ Object
4803 4804 4805 4806 4807 |
# File 'opal/lib/opal/parser/grammar.rb', line 4803 def _reduce_411(val, _values, result) result = str_append val[0], val[1] result end |
#_reduce_412(val, _values, result) ⇒ Object
4809 4810 4811 4812 4813 |
# File 'opal/lib/opal/parser/grammar.rb', line 4809 def _reduce_412(val, _values, result) result = new_str_content(val[0]) result end |
#_reduce_413(val, _values, result) ⇒ Object
4815 4816 4817 4818 4819 4820 |
# File 'opal/lib/opal/parser/grammar.rb', line 4815 def _reduce_413(val, _values, result) result = lexer.strterm lexer.strterm = nil result end |
#_reduce_414(val, _values, result) ⇒ Object
4822 4823 4824 4825 4826 4827 |
# File 'opal/lib/opal/parser/grammar.rb', line 4822 def _reduce_414(val, _values, result) lexer.strterm = val[1] result = new_evstr(val[2]) result end |
#_reduce_415(val, _values, result) ⇒ Object
4829 4830 4831 4832 4833 4834 4835 4836 4837 |
# File 'opal/lib/opal/parser/grammar.rb', line 4829 def _reduce_415(val, _values, result) lexer.cond_push 0 lexer.cmdarg_push 0 result = lexer.strterm lexer.strterm = nil lexer.lex_state = :expr_beg result end |
#_reduce_416(val, _values, result) ⇒ Object
4839 4840 4841 4842 4843 4844 4845 4846 |
# File 'opal/lib/opal/parser/grammar.rb', line 4839 def _reduce_416(val, _values, result) lexer.strterm = val[1] lexer.cond_lexpop lexer.cmdarg_lexpop result = new_evstr(val[2]) result end |
#_reduce_417(val, _values, result) ⇒ Object
4848 4849 4850 4851 4852 |
# File 'opal/lib/opal/parser/grammar.rb', line 4848 def _reduce_417(val, _values, result) result = new_gvar(val[0]) result end |
#_reduce_418(val, _values, result) ⇒ Object
4854 4855 4856 4857 4858 |
# File 'opal/lib/opal/parser/grammar.rb', line 4854 def _reduce_418(val, _values, result) result = new_ivar(val[0]) result end |
#_reduce_419(val, _values, result) ⇒ Object
4860 4861 4862 4863 4864 |
# File 'opal/lib/opal/parser/grammar.rb', line 4860 def _reduce_419(val, _values, result) result = new_cvar(val[0]) result end |
#_reduce_421(val, _values, result) ⇒ Object
reduce 420 omitted
4868 4869 4870 4871 4872 4873 |
# File 'opal/lib/opal/parser/grammar.rb', line 4868 def _reduce_421(val, _values, result) result = new_sym(val[1]) lexer.lex_state = :expr_end result end |
#_reduce_422(val, _values, result) ⇒ Object
4875 4876 4877 4878 4879 |
# File 'opal/lib/opal/parser/grammar.rb', line 4875 def _reduce_422(val, _values, result) result = new_sym(val[0]) result end |
#_reduce_427(val, _values, result) ⇒ Object
reduce 426 omitted
4889 4890 4891 4892 4893 |
# File 'opal/lib/opal/parser/grammar.rb', line 4889 def _reduce_427(val, _values, result) result = new_dsym val[1] result end |
#_reduce_428(val, _values, result) ⇒ Object
4895 4896 4897 4898 4899 |
# File 'opal/lib/opal/parser/grammar.rb', line 4895 def _reduce_428(val, _values, result) result = new_int(val[0]) result end |
#_reduce_429(val, _values, result) ⇒ Object
4901 4902 4903 4904 4905 |
# File 'opal/lib/opal/parser/grammar.rb', line 4901 def _reduce_429(val, _values, result) result = new_float(val[0]) result end |
#_reduce_432(val, _values, result) ⇒ Object
reduce 431 omitted
4911 4912 4913 4914 4915 |
# File 'opal/lib/opal/parser/grammar.rb', line 4911 def _reduce_432(val, _values, result) result = new_ident(val[0]) result end |
#_reduce_433(val, _values, result) ⇒ Object
4917 4918 4919 4920 4921 |
# File 'opal/lib/opal/parser/grammar.rb', line 4917 def _reduce_433(val, _values, result) result = new_ivar(val[0]) result end |
#_reduce_434(val, _values, result) ⇒ Object
4923 4924 4925 4926 4927 |
# File 'opal/lib/opal/parser/grammar.rb', line 4923 def _reduce_434(val, _values, result) result = new_gvar(val[0]) result end |
#_reduce_435(val, _values, result) ⇒ Object
4929 4930 4931 4932 4933 |
# File 'opal/lib/opal/parser/grammar.rb', line 4929 def _reduce_435(val, _values, result) result = new_const(val[0]) result end |
#_reduce_436(val, _values, result) ⇒ Object
4935 4936 4937 4938 4939 |
# File 'opal/lib/opal/parser/grammar.rb', line 4935 def _reduce_436(val, _values, result) result = new_cvar(val[0]) result end |
#_reduce_437(val, _values, result) ⇒ Object
4941 4942 4943 4944 4945 |
# File 'opal/lib/opal/parser/grammar.rb', line 4941 def _reduce_437(val, _values, result) result = new_nil(val[0]) result end |
#_reduce_438(val, _values, result) ⇒ Object
4947 4948 4949 4950 4951 |
# File 'opal/lib/opal/parser/grammar.rb', line 4947 def _reduce_438(val, _values, result) result = new_self(val[0]) result end |
#_reduce_439(val, _values, result) ⇒ Object
4953 4954 4955 4956 4957 |
# File 'opal/lib/opal/parser/grammar.rb', line 4953 def _reduce_439(val, _values, result) result = new_true(val[0]) result end |
#_reduce_440(val, _values, result) ⇒ Object
4959 4960 4961 4962 4963 |
# File 'opal/lib/opal/parser/grammar.rb', line 4959 def _reduce_440(val, _values, result) result = new_false(val[0]) result end |
#_reduce_441(val, _values, result) ⇒ Object
4965 4966 4967 4968 4969 |
# File 'opal/lib/opal/parser/grammar.rb', line 4965 def _reduce_441(val, _values, result) result = new___FILE__(val[0]) result end |
#_reduce_442(val, _values, result) ⇒ Object
4971 4972 4973 4974 4975 |
# File 'opal/lib/opal/parser/grammar.rb', line 4971 def _reduce_442(val, _values, result) result = new___LINE__(val[0]) result end |
#_reduce_443(val, _values, result) ⇒ Object
4977 4978 4979 4980 4981 |
# File 'opal/lib/opal/parser/grammar.rb', line 4977 def _reduce_443(val, _values, result) result = new_var_ref(val[0]) result end |
#_reduce_444(val, _values, result) ⇒ Object
4983 4984 4985 4986 4987 |
# File 'opal/lib/opal/parser/grammar.rb', line 4983 def _reduce_444(val, _values, result) result = new_assignable val[0] result end |
#_reduce_445(val, _values, result) ⇒ Object
4989 4990 4991 4992 4993 |
# File 'opal/lib/opal/parser/grammar.rb', line 4989 def _reduce_445(val, _values, result) result = s(:nth_ref, value(val[0])) result end |
#_reduce_447(val, _values, result) ⇒ Object
reduce 446 omitted
4997 4998 4999 5000 5001 |
# File 'opal/lib/opal/parser/grammar.rb', line 4997 def _reduce_447(val, _values, result) result = nil result end |
#_reduce_448(val, _values, result) ⇒ Object
5003 5004 5005 5006 5007 |
# File 'opal/lib/opal/parser/grammar.rb', line 5003 def _reduce_448(val, _values, result) result = val[1] result end |
#_reduce_449(val, _values, result) ⇒ Object
5009 5010 5011 5012 5013 |
# File 'opal/lib/opal/parser/grammar.rb', line 5009 def _reduce_449(val, _values, result) result = nil result end |
#_reduce_450(val, _values, result) ⇒ Object
5015 5016 5017 5018 5019 5020 |
# File 'opal/lib/opal/parser/grammar.rb', line 5015 def _reduce_450(val, _values, result) result = val[1] lexer.lex_state = :expr_beg result end |
#_reduce_451(val, _values, result) ⇒ Object
5022 5023 5024 5025 5026 |
# File 'opal/lib/opal/parser/grammar.rb', line 5022 def _reduce_451(val, _values, result) result = val[0] result end |
#_reduce_452(val, _values, result) ⇒ Object
5028 5029 5030 5031 5032 |
# File 'opal/lib/opal/parser/grammar.rb', line 5028 def _reduce_452(val, _values, result) result = new_args(val[0], val[2], val[4], val[5]) result end |
#_reduce_453(val, _values, result) ⇒ Object
5034 5035 5036 5037 5038 |
# File 'opal/lib/opal/parser/grammar.rb', line 5034 def _reduce_453(val, _values, result) result = new_args(val[0], val[2], nil, val[3]) result end |
#_reduce_454(val, _values, result) ⇒ Object
5040 5041 5042 5043 5044 |
# File 'opal/lib/opal/parser/grammar.rb', line 5040 def _reduce_454(val, _values, result) result = new_args(val[0], nil, val[2], val[3]) result end |
#_reduce_455(val, _values, result) ⇒ Object
5046 5047 5048 5049 5050 |
# File 'opal/lib/opal/parser/grammar.rb', line 5046 def _reduce_455(val, _values, result) result = new_args(val[0], nil, nil, val[1]) result end |
#_reduce_456(val, _values, result) ⇒ Object
5052 5053 5054 5055 5056 |
# File 'opal/lib/opal/parser/grammar.rb', line 5052 def _reduce_456(val, _values, result) result = new_args(nil, val[0], val[2], val[3]) result end |
#_reduce_457(val, _values, result) ⇒ Object
5058 5059 5060 5061 5062 |
# File 'opal/lib/opal/parser/grammar.rb', line 5058 def _reduce_457(val, _values, result) result = new_args(nil, val[0], nil, val[1]) result end |
#_reduce_458(val, _values, result) ⇒ Object
5064 5065 5066 5067 5068 |
# File 'opal/lib/opal/parser/grammar.rb', line 5064 def _reduce_458(val, _values, result) result = new_args(nil, nil, val[0], val[1]) result end |
#_reduce_459(val, _values, result) ⇒ Object
5070 5071 5072 5073 5074 |
# File 'opal/lib/opal/parser/grammar.rb', line 5070 def _reduce_459(val, _values, result) result = new_args(nil, nil, nil, val[0]) result end |
#_reduce_46(val, _values, result) ⇒ Object
reduce 45 omitted
3157 3158 3159 3160 3161 |
# File 'opal/lib/opal/parser/grammar.rb', line 3157 def _reduce_46(val, _values, result) result = new_return(val[0], val[1]) result end |
#_reduce_460(val, _values, result) ⇒ Object
5076 5077 5078 5079 5080 |
# File 'opal/lib/opal/parser/grammar.rb', line 5076 def _reduce_460(val, _values, result) result = new_args(nil, nil, nil, nil) result end |
#_reduce_462(val, _values, result) ⇒ Object
reduce 461 omitted
5084 5085 5086 5087 5088 5089 |
# File 'opal/lib/opal/parser/grammar.rb', line 5084 def _reduce_462(val, _values, result) result = value(val[0]).to_sym scope.add_local result result end |
#_reduce_463(val, _values, result) ⇒ Object
5091 5092 5093 5094 5095 |
# File 'opal/lib/opal/parser/grammar.rb', line 5091 def _reduce_463(val, _values, result) raise 'formal argument cannot be a constant' result end |
#_reduce_464(val, _values, result) ⇒ Object
5097 5098 5099 5100 5101 |
# File 'opal/lib/opal/parser/grammar.rb', line 5097 def _reduce_464(val, _values, result) raise 'formal argument cannot be an instance variable' result end |
#_reduce_465(val, _values, result) ⇒ Object
5103 5104 5105 5106 5107 |
# File 'opal/lib/opal/parser/grammar.rb', line 5103 def _reduce_465(val, _values, result) raise 'formal argument cannot be a class variable' result end |
#_reduce_466(val, _values, result) ⇒ Object
5109 5110 5111 5112 5113 |
# File 'opal/lib/opal/parser/grammar.rb', line 5109 def _reduce_466(val, _values, result) raise 'formal argument cannot be a global variable' result end |
#_reduce_467(val, _values, result) ⇒ Object
5115 5116 5117 5118 5119 |
# File 'opal/lib/opal/parser/grammar.rb', line 5115 def _reduce_467(val, _values, result) result = val[0] result end |
#_reduce_468(val, _values, result) ⇒ Object
5121 5122 5123 5124 5125 |
# File 'opal/lib/opal/parser/grammar.rb', line 5121 def _reduce_468(val, _values, result) result = val[1] result end |
#_reduce_469(val, _values, result) ⇒ Object
5127 5128 5129 5130 5131 |
# File 'opal/lib/opal/parser/grammar.rb', line 5127 def _reduce_469(val, _values, result) result = s(:lasgn, val[0]) result end |
#_reduce_47(val, _values, result) ⇒ Object
3163 3164 3165 3166 3167 |
# File 'opal/lib/opal/parser/grammar.rb', line 3163 def _reduce_47(val, _values, result) result = new_break(val[0], val[1]) result end |
#_reduce_471(val, _values, result) ⇒ Object
reduce 470 omitted
5135 5136 5137 5138 5139 |
# File 'opal/lib/opal/parser/grammar.rb', line 5135 def _reduce_471(val, _values, result) result = s(:array, val[0]) result end |
#_reduce_472(val, _values, result) ⇒ Object
5141 5142 5143 5144 5145 5146 |
# File 'opal/lib/opal/parser/grammar.rb', line 5141 def _reduce_472(val, _values, result) val[0] << val[2] result = val[0] result end |
#_reduce_478(val, _values, result) ⇒ Object
reduce 477 omitted
5158 5159 5160 5161 5162 |
# File 'opal/lib/opal/parser/grammar.rb', line 5158 def _reduce_478(val, _values, result) result = [val[0]] result end |
#_reduce_479(val, _values, result) ⇒ Object
5164 5165 5166 5167 5168 5169 |
# File 'opal/lib/opal/parser/grammar.rb', line 5164 def _reduce_479(val, _values, result) val[0] << val[2] result = val[0] result end |
#_reduce_48(val, _values, result) ⇒ Object
3169 3170 3171 3172 3173 |
# File 'opal/lib/opal/parser/grammar.rb', line 3169 def _reduce_48(val, _values, result) result = new_next(val[0], val[1]) result end |
#_reduce_480(val, _values, result) ⇒ Object
5171 5172 5173 5174 5175 |
# File 'opal/lib/opal/parser/grammar.rb', line 5171 def _reduce_480(val, _values, result) result = new_assign(new_assignable(new_ident(val[0])), val[1], val[2]) result end |
#_reduce_481(val, _values, result) ⇒ Object
5177 5178 5179 5180 5181 |
# File 'opal/lib/opal/parser/grammar.rb', line 5177 def _reduce_481(val, _values, result) result = s(:block, val[0]) result end |
#_reduce_482(val, _values, result) ⇒ Object
5183 5184 5185 5186 5187 5188 |
# File 'opal/lib/opal/parser/grammar.rb', line 5183 def _reduce_482(val, _values, result) result = val[0] val[0] << val[2] result end |
#_reduce_485(val, _values, result) ⇒ Object
reduce 484 omitted
5194 5195 5196 5197 5198 |
# File 'opal/lib/opal/parser/grammar.rb', line 5194 def _reduce_485(val, _values, result) result = "*#{value(val[1])}".to_sym result end |
#_reduce_486(val, _values, result) ⇒ Object
5200 5201 5202 5203 5204 |
# File 'opal/lib/opal/parser/grammar.rb', line 5200 def _reduce_486(val, _values, result) result = :*" result end |
#_reduce_489(val, _values, result) ⇒ Object
reduce 488 omitted
5210 5211 5212 5213 5214 |
# File 'opal/lib/opal/parser/grammar.rb', line 5210 def _reduce_489(val, _values, result) result = "&#{value(val[1])}".to_sym result end |
#_reduce_490(val, _values, result) ⇒ Object
5216 5217 5218 5219 5220 |
# File 'opal/lib/opal/parser/grammar.rb', line 5216 def _reduce_490(val, _values, result) result = val[1] result end |
#_reduce_491(val, _values, result) ⇒ Object
5222 5223 5224 5225 5226 |
# File 'opal/lib/opal/parser/grammar.rb', line 5222 def _reduce_491(val, _values, result) result = nil result end |
#_reduce_492(val, _values, result) ⇒ Object
5228 5229 5230 5231 5232 |
# File 'opal/lib/opal/parser/grammar.rb', line 5228 def _reduce_492(val, _values, result) result = val[0] result end |
#_reduce_493(val, _values, result) ⇒ Object
5234 5235 5236 5237 5238 |
# File 'opal/lib/opal/parser/grammar.rb', line 5234 def _reduce_493(val, _values, result) result = val[1] result end |
#_reduce_494(val, _values, result) ⇒ Object
5240 5241 5242 5243 5244 |
# File 'opal/lib/opal/parser/grammar.rb', line 5240 def _reduce_494(val, _values, result) result = [] result end |
#_reduce_495(val, _values, result) ⇒ Object
5246 5247 5248 5249 5250 |
# File 'opal/lib/opal/parser/grammar.rb', line 5246 def _reduce_495(val, _values, result) result = val[0] result end |
#_reduce_496(val, _values, result) ⇒ Object
5252 5253 5254 5255 5256 |
# File 'opal/lib/opal/parser/grammar.rb', line 5252 def _reduce_496(val, _values, result) result = val[0] result end |
#_reduce_497(val, _values, result) ⇒ Object
5258 5259 5260 5261 5262 |
# File 'opal/lib/opal/parser/grammar.rb', line 5258 def _reduce_497(val, _values, result) result = val[0].push(*val[2]) result end |
#_reduce_498(val, _values, result) ⇒ Object
5264 5265 5266 5267 5268 |
# File 'opal/lib/opal/parser/grammar.rb', line 5264 def _reduce_498(val, _values, result) result = [val[0], val[2]] result end |
#_reduce_499(val, _values, result) ⇒ Object
5270 5271 5272 5273 5274 |
# File 'opal/lib/opal/parser/grammar.rb', line 5270 def _reduce_499(val, _values, result) result = [new_sym(val[0]), val[1]] result end |
#_reduce_5(val, _values, result) ⇒ Object
2961 2962 2963 2964 2965 2966 |
# File 'opal/lib/opal/parser/grammar.rb', line 2961 def _reduce_5(val, _values, result) val[0] << val[2] result = val[0] result end |
#_reduce_523(val, _values, result) ⇒ Object
reduce 522 omitted
5322 5323 5324 5325 5326 |
# File 'opal/lib/opal/parser/grammar.rb', line 5322 def _reduce_523(val, _values, result) result = nil result end |
#_reduce_53(val, _values, result) ⇒ Object
reduce 52 omitted
3183 3184 3185 3186 3187 |
# File 'opal/lib/opal/parser/grammar.rb', line 3183 def _reduce_53(val, _values, result) result = new_call(nil, val[0], val[1]) result end |
#_reduce_55(val, _values, result) ⇒ Object
reduce 54 omitted
3191 3192 3193 3194 3195 |
# File 'opal/lib/opal/parser/grammar.rb', line 3191 def _reduce_55(val, _values, result) result = new_call(val[0], val[2], val[3]) result end |
#_reduce_57(val, _values, result) ⇒ Object
reduce 56 omitted
3199 3200 3201 3202 3203 |
# File 'opal/lib/opal/parser/grammar.rb', line 3199 def _reduce_57(val, _values, result) result = new_call(val[0], val[2], val[3]) result end |
#_reduce_59(val, _values, result) ⇒ Object
reduce 58 omitted
3207 3208 3209 3210 3211 |
# File 'opal/lib/opal/parser/grammar.rb', line 3207 def _reduce_59(val, _values, result) result = new_super(val[0], val[1]) result end |
#_reduce_60(val, _values, result) ⇒ Object
3213 3214 3215 3216 3217 |
# File 'opal/lib/opal/parser/grammar.rb', line 3213 def _reduce_60(val, _values, result) result = new_yield val[1] result end |
#_reduce_61(val, _values, result) ⇒ Object
3219 3220 3221 3222 3223 |
# File 'opal/lib/opal/parser/grammar.rb', line 3219 def _reduce_61(val, _values, result) result = val[0] result end |
#_reduce_62(val, _values, result) ⇒ Object
3225 3226 3227 3228 3229 |
# File 'opal/lib/opal/parser/grammar.rb', line 3225 def _reduce_62(val, _values, result) result = val[1] result end |
#_reduce_63(val, _values, result) ⇒ Object
3231 3232 3233 3234 3235 |
# File 'opal/lib/opal/parser/grammar.rb', line 3231 def _reduce_63(val, _values, result) result = val[0] result end |
#_reduce_64(val, _values, result) ⇒ Object
3237 3238 3239 3240 3241 |
# File 'opal/lib/opal/parser/grammar.rb', line 3237 def _reduce_64(val, _values, result) result = val[1] result end |
#_reduce_65(val, _values, result) ⇒ Object
3243 3244 3245 3246 3247 |
# File 'opal/lib/opal/parser/grammar.rb', line 3243 def _reduce_65(val, _values, result) result = val[0] result end |
#_reduce_66(val, _values, result) ⇒ Object
3249 3250 3251 3252 3253 |
# File 'opal/lib/opal/parser/grammar.rb', line 3249 def _reduce_66(val, _values, result) result = val[0] << val[1] result end |
#_reduce_67(val, _values, result) ⇒ Object
3255 3256 3257 3258 3259 |
# File 'opal/lib/opal/parser/grammar.rb', line 3255 def _reduce_67(val, _values, result) result = val[0] << s(:splat, val[2]) result end |
#_reduce_69(val, _values, result) ⇒ Object
reduce 68 omitted
3263 3264 3265 3266 3267 |
# File 'opal/lib/opal/parser/grammar.rb', line 3263 def _reduce_69(val, _values, result) result = val[0] << s(:splat) result end |
#_reduce_7(val, _values, result) ⇒ Object
reduce 6 omitted
2970 2971 2972 2973 2974 |
# File 'opal/lib/opal/parser/grammar.rb', line 2970 def _reduce_7(val, _values, result) result = val[2] result end |
#_reduce_71(val, _values, result) ⇒ Object
reduce 70 omitted
3271 3272 3273 3274 3275 |
# File 'opal/lib/opal/parser/grammar.rb', line 3271 def _reduce_71(val, _values, result) result = s(:array, s(:splat, val[1])) result end |
#_reduce_72(val, _values, result) ⇒ Object
3277 3278 3279 3280 3281 |
# File 'opal/lib/opal/parser/grammar.rb', line 3277 def _reduce_72(val, _values, result) result = s(:array, s(:splat)) result end |
#_reduce_74(val, _values, result) ⇒ Object
reduce 73 omitted
3285 3286 3287 3288 3289 |
# File 'opal/lib/opal/parser/grammar.rb', line 3285 def _reduce_74(val, _values, result) result = val[0] result end |
#_reduce_75(val, _values, result) ⇒ Object
3291 3292 3293 3294 3295 |
# File 'opal/lib/opal/parser/grammar.rb', line 3291 def _reduce_75(val, _values, result) result = val[1] result end |
#_reduce_76(val, _values, result) ⇒ Object
3297 3298 3299 3300 3301 |
# File 'opal/lib/opal/parser/grammar.rb', line 3297 def _reduce_76(val, _values, result) result = s(:array, val[0]) result end |
#_reduce_77(val, _values, result) ⇒ Object
3303 3304 3305 3306 3307 |
# File 'opal/lib/opal/parser/grammar.rb', line 3303 def _reduce_77(val, _values, result) result = val[0] << val[1] result end |
#_reduce_8(val, _values, result) ⇒ Object
2976 2977 2978 2979 2980 |
# File 'opal/lib/opal/parser/grammar.rb', line 2976 def _reduce_8(val, _values, result) result = new_body(val[0], val[1], val[2], val[3]) result end |
#_reduce_80(val, _values, result) ⇒ Object
reduce 79 omitted
3313 3314 3315 3316 3317 |
# File 'opal/lib/opal/parser/grammar.rb', line 3313 def _reduce_80(val, _values, result) result = new_assignable val[0] result end |
#_reduce_81(val, _values, result) ⇒ Object
3319 3320 3321 3322 3323 3324 |
# File 'opal/lib/opal/parser/grammar.rb', line 3319 def _reduce_81(val, _values, result) args = val[2] ? val[2] : [] result = s(:attrasgn, val[0], :[]=, s(:arglist, *args)) result end |
#_reduce_82(val, _values, result) ⇒ Object
3326 3327 3328 3329 3330 |
# File 'opal/lib/opal/parser/grammar.rb', line 3326 def _reduce_82(val, _values, result) result = new_call val[0], val[2], [] result end |
#_reduce_88(val, _values, result) ⇒ Object
reduce 87 omitted
3342 3343 3344 3345 3346 |
# File 'opal/lib/opal/parser/grammar.rb', line 3342 def _reduce_88(val, _values, result) result = new_assignable val[0] result end |
#_reduce_89(val, _values, result) ⇒ Object
3348 3349 3350 3351 3352 |
# File 'opal/lib/opal/parser/grammar.rb', line 3348 def _reduce_89(val, _values, result) result = new_attrasgn(val[0], :[]=, val[2]) result end |
#_reduce_9(val, _values, result) ⇒ Object
2982 2983 2984 2985 2986 |
# File 'opal/lib/opal/parser/grammar.rb', line 2982 def _reduce_9(val, _values, result) result = new_compstmt val[0] result end |
#_reduce_90(val, _values, result) ⇒ Object
3354 3355 3356 3357 3358 |
# File 'opal/lib/opal/parser/grammar.rb', line 3354 def _reduce_90(val, _values, result) result = new_attrasgn(val[0], op_to_setter(val[2])) result end |
#_reduce_91(val, _values, result) ⇒ Object
3360 3361 3362 3363 3364 |
# File 'opal/lib/opal/parser/grammar.rb', line 3360 def _reduce_91(val, _values, result) result = new_attrasgn(val[0], op_to_setter(val[2])) result end |
#_reduce_92(val, _values, result) ⇒ Object
3366 3367 3368 3369 3370 |
# File 'opal/lib/opal/parser/grammar.rb', line 3366 def _reduce_92(val, _values, result) result = new_attrasgn(val[0], op_to_setter(val[2])) result end |
#_reduce_93(val, _values, result) ⇒ Object
3372 3373 3374 3375 3376 |
# File 'opal/lib/opal/parser/grammar.rb', line 3372 def _reduce_93(val, _values, result) result = new_colon2(val[0], val[1], val[2]) result end |
#_reduce_94(val, _values, result) ⇒ Object
3378 3379 3380 3381 3382 |
# File 'opal/lib/opal/parser/grammar.rb', line 3378 def _reduce_94(val, _values, result) result = new_colon3(val[0], val[1]) result end |
#_reduce_97(val, _values, result) ⇒ Object
reduce 96 omitted
3388 3389 3390 3391 3392 |
# File 'opal/lib/opal/parser/grammar.rb', line 3388 def _reduce_97(val, _values, result) result = new_colon3(val[0], val[1]) result end |
#_reduce_98(val, _values, result) ⇒ Object
3394 3395 3396 3397 3398 |
# File 'opal/lib/opal/parser/grammar.rb', line 3394 def _reduce_98(val, _values, result) result = new_const(val[0]) result end |
#_reduce_99(val, _values, result) ⇒ Object
3400 3401 3402 3403 3404 |
# File 'opal/lib/opal/parser/grammar.rb', line 3400 def _reduce_99(val, _values, result) result = new_colon2(val[0], val[1], val[2]) result end |
#_reduce_none(val, _values, result) ⇒ Object
5328 5329 5330 |
# File 'opal/lib/opal/parser/grammar.rb', line 5328 def _reduce_none(val, _values, result) val[0] end |
#add_block_pass(arglist, block) ⇒ Object
412 413 414 415 |
# File 'opal/lib/opal/parser.rb', line 412 def add_block_pass(arglist, block) arglist << block if block arglist end |
#new___FILE__(tok) ⇒ Object
89 90 91 |
# File 'opal/lib/opal/parser.rb', line 89 def new___FILE__(tok) s1(:str, self.file, source(tok)) end |
#new___LINE__(tok) ⇒ Object
93 94 95 |
# File 'opal/lib/opal/parser.rb', line 93 def new___LINE__(tok) s1(:int, lexer.line, source(tok)) end |
#new_alias(kw, new, old) ⇒ Object
139 140 141 142 143 |
# File 'opal/lib/opal/parser.rb', line 139 def new_alias(kw, new, old) sexp = s(:alias, new, old) sexp.source = source(kw) sexp end |
#new_and(lhs, tok, rhs) ⇒ Object
388 389 390 391 392 |
# File 'opal/lib/opal/parser.rb', line 388 def new_and(lhs, tok, rhs) sexp = s(:and, lhs, rhs) sexp.source = source(tok) sexp end |
#new_args(norm, opt, rest, block) ⇒ Object
298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 |
# File 'opal/lib/opal/parser.rb', line 298 def new_args(norm, opt, rest, block) res = s(:args) if norm norm.each do |arg| scope.add_local arg res << arg end end if opt opt[1..-1].each do |_opt| res << _opt[1] end end if rest res << rest rest_str = rest.to_s[1..-1] scope.add_local rest_str.to_sym unless rest_str.empty? end if block res << block scope.add_local block.to_s[1..-1].to_sym end res << opt if opt res end |
#new_array(start, args, finish) ⇒ Object
273 274 275 276 277 278 |
# File 'opal/lib/opal/parser.rb', line 273 def new_array(start, args, finish) args ||= [] sexp = s(:array, *args) sexp.source = source(start) sexp end |
#new_assign(lhs, tok, rhs) ⇒ Object
459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 |
# File 'opal/lib/opal/parser.rb', line 459 def new_assign(lhs, tok, rhs) case lhs.type when :iasgn, :cdecl, :lasgn, :gasgn, :cvdecl, :nth_ref lhs << rhs lhs when :call, :attrasgn lhs.last << rhs lhs when :colon2 lhs << rhs lhs.type = :casgn lhs when :colon3 lhs << rhs lhs.type = :casgn3 lhs else raise "Bad lhs for new_assign: #{lhs.type}" end end |
#new_assignable(ref) ⇒ Object
480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 |
# File 'opal/lib/opal/parser.rb', line 480 def new_assignable(ref) case ref.type when :ivar ref.type = :iasgn when :const ref.type = :cdecl when :identifier scope.add_local ref[1] unless scope.has_local? ref[1] ref.type = :lasgn when :gvar ref.type = :gasgn when :cvar ref.type = :cvdecl else raise "Bad new_assignable type: #{ref.type}" end ref end |
#new_attrasgn(recv, op, args = []) ⇒ Object
453 454 455 456 457 |
# File 'opal/lib/opal/parser.rb', line 453 def new_attrasgn(recv, op, args=[]) arglist = s(:arglist, *args) sexp = s(:attrasgn, recv, op, arglist) sexp end |
#new_binary_call(recv, meth, arg) ⇒ Object
380 381 382 |
# File 'opal/lib/opal/parser.rb', line 380 def new_binary_call(recv, meth, arg) new_call(recv, meth, [arg]) end |
#new_block(stmt = nil) ⇒ Object
179 180 181 182 183 |
# File 'opal/lib/opal/parser.rb', line 179 def new_block(stmt = nil) sexp = s(:block) sexp << stmt if stmt sexp end |
#new_block_args(norm, opt, rest, block) ⇒ Object
330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 |
# File 'opal/lib/opal/parser.rb', line 330 def new_block_args(norm, opt, rest, block) res = s(:array) if norm norm.each do |arg| if arg.is_a? Symbol scope.add_local arg res << s(:lasgn, arg) else res << arg end end end if opt opt[1..-1].each do |_opt| res << s(:lasgn, _opt[1]) end end if rest r = rest.to_s[1..-1].to_sym res << new_splat(nil, s(:lasgn, r)) scope.add_local r end if block b = block.to_s[1..-1].to_sym res << s(:block_pass, s(:lasgn, b)) scope.add_local b end res << opt if opt args = res.size == 2 && norm ? res[1] : s(:masgn, res) if args.type == :array s(:masgn, args) else args end end |
#new_block_pass(amper_tok, val) ⇒ Object
417 418 419 |
# File 'opal/lib/opal/parser.rb', line 417 def new_block_pass(amper_tok, val) s1(:block_pass, val, source(amper_tok)) end |
#new_body(compstmt, res, els, ens) ⇒ Object
203 204 205 206 207 208 209 210 211 212 213 |
# File 'opal/lib/opal/parser.rb', line 203 def new_body(compstmt, res, els, ens) s = compstmt || s(:block) if res s = s(:rescue, s) res.each { |r| s << r } s << els if els end ens ? s(:ensure, s, ens) : s end |
#new_break(kw, args = nil) ⇒ Object
145 146 147 148 149 150 151 152 153 154 155 |
# File 'opal/lib/opal/parser.rb', line 145 def new_break(kw, args=nil) if args.nil? sexp = s(:break) elsif args.length == 1 sexp = s(:break, args[0]) else sexp = s(:break, s(:array, *args)) end sexp end |
#new_call(recv, meth, args = nil) ⇒ Object
373 374 375 376 377 378 |
# File 'opal/lib/opal/parser.rb', line 373 def new_call(recv, meth, args = nil) args ||= [] sexp = s(:call, recv, value(meth).to_sym, s(:arglist, *args)) sexp.source = source(meth) sexp end |
#new_class(start, path, sup, body, endt) ⇒ Object
224 225 226 227 228 |
# File 'opal/lib/opal/parser.rb', line 224 def new_class(start, path, sup, body, endt) sexp = s(:class, path, sup, body) sexp.source = source(start) sexp end |
#new_colon2(lhs, tok, name) ⇒ Object
125 126 127 128 129 |
# File 'opal/lib/opal/parser.rb', line 125 def new_colon2(lhs, tok, name) sexp = s(:colon2, lhs, value(name).to_sym) sexp.source = source(tok) sexp end |
#new_colon3(tok, name) ⇒ Object
131 132 133 |
# File 'opal/lib/opal/parser.rb', line 131 def new_colon3(tok, name) s1(:colon3, value(name).to_sym, source(name)) end |
#new_compstmt(block) ⇒ Object
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'opal/lib/opal/parser.rb', line 185 def new_compstmt(block) comp = if block.size == 1 nil elsif block.size == 2 block[1] else block end if comp && comp.type == :begin && comp.size == 2 result = comp[1] else result = comp end result end |
#new_const(tok) ⇒ Object
121 122 123 |
# File 'opal/lib/opal/parser.rb', line 121 def new_const(tok) s1(:const, value(tok).to_sym, source(tok)) end |
#new_cvar(tok) ⇒ Object
117 118 119 |
# File 'opal/lib/opal/parser.rb', line 117 def new_cvar(tok) s1(:cvar, value(tok).to_sym, source(tok)) end |
#new_def(kw, recv, name, args, body, end_tok) ⇒ Object
215 216 217 218 219 220 221 222 |
# File 'opal/lib/opal/parser.rb', line 215 def new_def(kw, recv, name, args, body, end_tok) body = s(:block, body) if body.type != :block body << s(:nil) if body.size == 1 sexp = s(:def, recv, value(name).to_sym, args, body) sexp.source = source(kw) sexp end |
#new_dsym(str) ⇒ Object
577 578 579 580 581 582 583 584 585 586 587 588 |
# File 'opal/lib/opal/parser.rb', line 577 def new_dsym(str) return s(:nil) unless str case str.type when :str str.type = :sym str[1] = str[1].to_sym when :dstr str.type = :dsym end str end |
#new_erange(beg, op, finish) ⇒ Object
406 407 408 409 410 |
# File 'opal/lib/opal/parser.rb', line 406 def new_erange(beg, op, finish) sexp = s(:erange, beg, finish) sexp.source = source(op) sexp end |
#new_evstr(str) ⇒ Object
590 591 592 |
# File 'opal/lib/opal/parser.rb', line 590 def new_evstr(str) s(:evstr, str) end |
#new_false(tok) ⇒ Object
85 86 87 |
# File 'opal/lib/opal/parser.rb', line 85 def new_false(tok) s0(:false, source(tok)) end |
#new_float(tok) ⇒ Object
105 106 107 |
# File 'opal/lib/opal/parser.rb', line 105 def new_float(tok) s1(:float, value(tok), source(tok)) end |
#new_gettable(ref) ⇒ Object
500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 |
# File 'opal/lib/opal/parser.rb', line 500 def new_gettable(ref) res = case ref.type when :lasgn s(:lvar, ref[1]) when :iasgn s(:ivar, ref[1]) when :gasgn s(:gvar, ref[1]) when :cvdecl s(:cvar, ref[1]) when :cdecl s(:const, ref[1]) else raise "Bad new_gettable ref: #{ref.type}" end res.source = ref.source res end |
#new_gvar(tok) ⇒ Object
113 114 115 |
# File 'opal/lib/opal/parser.rb', line 113 def new_gvar(tok) s1(:gvar, value(tok).to_sym, source(tok)) end |
#new_hash(open, assocs, close) ⇒ Object
280 281 282 283 284 |
# File 'opal/lib/opal/parser.rb', line 280 def new_hash(open, assocs, close) sexp = s(:hash, *assocs) sexp.source = source(open) sexp end |
#new_ident(tok) ⇒ Object
97 98 99 |
# File 'opal/lib/opal/parser.rb', line 97 def new_ident(tok) s1(:identifier, value(tok).to_sym, source(tok)) end |
#new_if(if_tok, expr, stmt, tail) ⇒ Object
249 250 251 252 253 |
# File 'opal/lib/opal/parser.rb', line 249 def new_if(if_tok, expr, stmt, tail) sexp = s(:if, expr, stmt, tail) sexp.source = source(if_tok) sexp end |
#new_int(tok) ⇒ Object
101 102 103 |
# File 'opal/lib/opal/parser.rb', line 101 def new_int(tok) s1(:int, value(tok), source(tok)) end |
#new_irange(beg, op, finish) ⇒ Object
400 401 402 403 404 |
# File 'opal/lib/opal/parser.rb', line 400 def new_irange(beg, op, finish) sexp = s(:irange, beg, finish) sexp.source = source(op) sexp end |
#new_iter(args, body) ⇒ Object
242 243 244 245 246 247 |
# File 'opal/lib/opal/parser.rb', line 242 def new_iter(args, body) args ||= nil s = s(:iter, args) s << body if body s end |
#new_ivar(tok) ⇒ Object
109 110 111 |
# File 'opal/lib/opal/parser.rb', line 109 def new_ivar(tok) s1(:ivar, value(tok).to_sym, source(tok)) end |
#new_module(kw, path, body, end_tok) ⇒ Object
236 237 238 239 240 |
# File 'opal/lib/opal/parser.rb', line 236 def new_module(kw, path, body, end_tok) sexp = s(:module, path, body) sexp.source = source(kw) sexp end |
#new_next(kw, args = []) ⇒ Object
169 170 171 172 173 174 175 176 177 |
# File 'opal/lib/opal/parser.rb', line 169 def new_next(kw, args=[]) if args.length == 1 sexp = s(:next, args[0]) else sexp = s(:next, s(:array, *args)) end sexp end |
#new_nil(tok) ⇒ Object
73 74 75 |
# File 'opal/lib/opal/parser.rb', line 73 def new_nil(tok) s0(:nil, source(tok)) end |
#new_not(kw, expr) ⇒ Object
286 287 288 |
# File 'opal/lib/opal/parser.rb', line 286 def new_not(kw, expr) s1(:not, expr, source(kw)) end |
#new_op_asgn(op, lhs, rhs) ⇒ Object
425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 |
# File 'opal/lib/opal/parser.rb', line 425 def new_op_asgn(op, lhs, rhs) case value(op).to_sym when :||" result = s(:op_asgn_or, new_gettable(lhs)) result << (lhs << rhs) when :&&" result = s(:op_asgn_and, new_gettable(lhs)) result << (lhs << rhs) else result = lhs result << new_call(new_gettable(lhs), op, [rhs]) end result end |
#new_op_asgn1(lhs, args, op, rhs) ⇒ Object
442 443 444 445 446 447 |
# File 'opal/lib/opal/parser.rb', line 442 def new_op_asgn1(lhs, args, op, rhs) arglist = s(:arglist, *args) sexp = s(:op_asgn1, lhs, arglist, value(op), rhs) sexp.source = source(op) sexp end |
#new_or(lhs, tok, rhs) ⇒ Object
394 395 396 397 398 |
# File 'opal/lib/opal/parser.rb', line 394 def new_or(lhs, tok, rhs) sexp = s(:or, lhs, rhs) sexp.source = source(tok) sexp end |
#new_paren(open, expr, close) ⇒ Object
290 291 292 293 294 295 296 |
# File 'opal/lib/opal/parser.rb', line 290 def new_paren(open, expr, close) if expr.nil? or expr == [:block] s1(:paren, s0(:nil, source(open)), source(open)) else s1(:paren, expr, source(open)) end end |
#new_regexp(reg, ending) ⇒ Object
612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'opal/lib/opal/parser.rb', line 612 def new_regexp(reg, ending) return s(:regexp, '') unless reg case reg.type when :str s(:regexp, reg[1], value(ending)) when :evstr s(:dregx, "", reg) when :dstr reg.type = :dregx reg end end |
#new_rescue_mod(kw, expr, resc) ⇒ Object
267 268 269 270 271 |
# File 'opal/lib/opal/parser.rb', line 267 def new_rescue_mod(kw, expr, resc) sexp = s(:rescue_mod, expr, resc) sexp.source = source(kw) sexp end |
#new_return(kw, args = nil) ⇒ Object
157 158 159 160 161 162 163 164 165 166 167 |
# File 'opal/lib/opal/parser.rb', line 157 def new_return(kw, args=nil) if args.nil? sexp = s(:return) elsif args.length == 1 sexp = s(:return, args[0]) else sexp = s(:return, s(:array, *args)) end sexp end |
#new_sclass(kw, expr, body, end_tok) ⇒ Object
230 231 232 233 234 |
# File 'opal/lib/opal/parser.rb', line 230 def new_sclass(kw, expr, body, end_tok) sexp = s(:sclass, expr, body) sexp.source = source(kw) sexp end |
#new_self(tok) ⇒ Object
77 78 79 |
# File 'opal/lib/opal/parser.rb', line 77 def new_self(tok) s0(:self, source(tok)) end |
#new_splat(tok, value) ⇒ Object
421 422 423 |
# File 'opal/lib/opal/parser.rb', line 421 def new_splat(tok, value) s1(:splat, value, source(tok)) end |
#new_str(str) ⇒ Object
594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 |
# File 'opal/lib/opal/parser.rb', line 594 def new_str(str) # cover empty strings return s(:str, "") unless str # catch s(:str, "", other_str) if str.size == 3 and str[1] == "" and str.type == :str return str[2] # catch s(:str, "content", more_content) elsif str.type == :str && str.size > 3 str.type = :dstr str # top level evstr should be a dstr elsif str.type == :evstr s(:dstr, "", str) else str end end |
#new_str_content(tok) ⇒ Object
640 641 642 |
# File 'opal/lib/opal/parser.rb', line 640 def new_str_content(tok) s1(:str, value(tok), source(tok)) end |
#new_super(kw, args) ⇒ Object
548 549 550 551 552 553 554 555 556 557 |
# File 'opal/lib/opal/parser.rb', line 548 def new_super(kw, args) if args.nil? sexp = s(:super, nil) else sexp = s(:super, s(:arglist, *args)) end sexp.source = source(kw) sexp end |
#new_sym(tok) ⇒ Object
135 136 137 |
# File 'opal/lib/opal/parser.rb', line 135 def new_sym(tok) s1(:sym, value(tok).to_sym, source(tok)) end |
#new_true(tok) ⇒ Object
81 82 83 |
# File 'opal/lib/opal/parser.rb', line 81 def new_true(tok) s0(:true, source(tok)) end |
#new_unary_call(op, recv) ⇒ Object
384 385 386 |
# File 'opal/lib/opal/parser.rb', line 384 def new_unary_call(op, recv) new_call(recv, op, []) end |
#new_until(kw, test, body) ⇒ Object
261 262 263 264 265 |
# File 'opal/lib/opal/parser.rb', line 261 def new_until(kw, test, body) sexp = s(:until, test, body) sexp.source = source(kw) sexp end |
#new_var_ref(ref) ⇒ Object
520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 |
# File 'opal/lib/opal/parser.rb', line 520 def new_var_ref(ref) case ref.type when :self, :nil, :true, :false, :line, :file ref when :const ref when :ivar, :gvar, :cvar ref when :int # this is when we passed __LINE__ which is converted into :int ref when :str # returns for __FILE__ as it is converted into str ref when :identifier result = if scope.has_local? ref[1] s(:lvar, ref[1]) else s(:call, nil, ref[1], s(:arglist)) end result.source = ref.source result else raise "Bad var_ref type: #{ref.type}" end end |
#new_while(kw, test, body) ⇒ Object
255 256 257 258 259 |
# File 'opal/lib/opal/parser.rb', line 255 def new_while(kw, test, body) sexp = s(:while, test, body) sexp.source = source(kw) sexp end |
#new_xstr(start_t, str, end_t) ⇒ Object
564 565 566 567 568 569 570 571 572 573 574 575 |
# File 'opal/lib/opal/parser.rb', line 564 def new_xstr(start_t, str, end_t) return s(:xstr, '') unless str case str.type when :str then str.type = :xstr when :dstr then str.type = :dxstr when :evstr then str = s(:dxstr, '', str) end str.source = source(start_t) str end |
#new_yield(args) ⇒ Object
559 560 561 562 |
# File 'opal/lib/opal/parser.rb', line 559 def new_yield(args) args ||= [] s(:yield, *args) end |
#next_token ⇒ Object
28 29 30 |
# File 'opal/lib/opal/parser.rb', line 28 def next_token @lexer.next_token end |
#on_error(t, val, vstack) ⇒ Object
49 50 51 |
# File 'opal/lib/opal/parser.rb', line 49 def on_error(t, val, vstack) raise "parse error on value #{value(val).inspect} (#{token_to_str(t) || '?'}) :#{@file}:#{lexer.line}" end |
#op_to_setter(op) ⇒ Object
449 450 451 |
# File 'opal/lib/opal/parser.rb', line 449 def op_to_setter(op) "#{value(op)}=".to_sym end |
#parse(source, file = '(string)') ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'opal/lib/opal/parser.rb', line 11 def parse(source, file = '(string)') @file = file @scopes = [] @lexer = Lexer.new(source, file) @lexer.parser = self self.parse_to_sexp end |
#parse_to_sexp ⇒ Object
20 21 22 23 24 25 26 |
# File 'opal/lib/opal/parser.rb', line 20 def parse_to_sexp push_scope result = do_parse pop_scope result end |
#pop_scope ⇒ Object
44 45 46 47 |
# File 'opal/lib/opal/parser.rb', line 44 def pop_scope @scopes.pop @scope = @scopes.last end |
#push_scope(type = nil) ⇒ Object
36 37 38 39 40 41 42 |
# File 'opal/lib/opal/parser.rb', line 36 def push_scope(type = nil) top = @scopes.last scope = ParserScope.new type scope.parent = top @scopes << scope @scope = scope end |
#s(*parts) ⇒ Object
32 33 34 |
# File 'opal/lib/opal/parser.rb', line 32 def s(*parts) Sexp.new(parts) end |
#s0(type, source) ⇒ Object
61 62 63 64 65 |
# File 'opal/lib/opal/parser.rb', line 61 def s0(type, source) sexp = s(type) sexp.source = source sexp end |
#s1(type, first, source) ⇒ Object
67 68 69 70 71 |
# File 'opal/lib/opal/parser.rb', line 67 def s1(type, first, source) sexp = s(type, first) sexp.source = source sexp end |
#source(tok) ⇒ Object
57 58 59 |
# File 'opal/lib/opal/parser.rb', line 57 def source(tok) tok ? tok[1] : nil end |
#str_append(str, str2) ⇒ Object
625 626 627 628 629 630 631 632 633 634 635 636 637 638 |
# File 'opal/lib/opal/parser.rb', line 625 def str_append(str, str2) return str2 unless str return str unless str2 if str.type == :evstr str = s(:dstr, "", str) elsif str.type == :str str = s(:dstr, str[1]) else #puts str.type end str << str2 str end |
#value(tok) ⇒ Object
53 54 55 |
# File 'opal/lib/opal/parser.rb', line 53 def value(tok) tok[0] end |