Class: Opal::Rewriters::MlhsArgs::MlhsRewriter
- Defined in:
- opal/lib/opal/rewriters/mlhs_args.rb
Constant Summary
Constants inherited from Base
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
Methods inherited from Base
#append_to_body , #begin_with_stmts , #dynamic! , #error , #on_top , #prepend_to_body , #process , s , #s , #stmts_of
Instance Method Details
#on_arg(node) ⇒ Object
113 114 115
# File 'opal/lib/opal/rewriters/mlhs_args.rb', line 113 def on_arg(node) node.updated(:lvasgn) end
#on_restarg(node) ⇒ Object
117 118 119 120 121 122 123 124
# File 'opal/lib/opal/rewriters/mlhs_args.rb', line 117 def on_restarg(node) name = node.children[0] if name s(:splat, node.updated(:lvasgn)) else s(:splat) end end