Class: RedParse::BlockFormalsNode
- Defined in:
- lib/redparse/node.rb
Overview
obsolete
Constant Summary
Constants included from FlattenedIvars
FlattenedIvars::EXCLUDED_IVARS
Instance Attribute Summary
Attributes inherited from Node
#endline, #errors, #offset, #parent, #startline
Attributes included from Stackable::Meta
#boolean_identity_params, #identity_params
Instance Method Summary collapse
-
#initialize(goalpost1, param_list, goalpost2) ⇒ BlockFormalsNode
constructor
A new instance of BlockFormalsNode.
- #parsetree(o) ⇒ Object
- #to_lisp ⇒ Object
Methods inherited from Node
#+, #+@, #==, [], #[]=, #add_parent_links!, #begin_parsetree, create, #data, #deep_copy, #delete_extraneous_ivars!, #delete_linenums!, #depthwalk, #depthwalk_nodes, #error?, #evalable_inspect, #fixup_multiple_assignments!, #fixup_rescue_assignments!, #image, #initialize_ivars, inline_symbols, #inspect, #lhs_unparse, #linerange, #lvalue, #lvars_defined_in, #merge_replacement_session, namelist, #negate, #original_brackets_assign, param_names, #parsetrees, #pretty_print, #prohibit_fixup, #replace_ivars_and_self, #replace_value, #rescue_parsetree, #to_parsetree, #to_parsetree_and_warnings, #unary, #walk, #xform_tree!
Methods included from Stackable::Meta
#build_exemplars, #enumerate_exemplars, #identity_param
Methods included from FlattenedIvars
#flattened_ivars, #flattened_ivars_equal?
Methods included from Stackable
Constructor Details
#initialize(goalpost1, param_list, goalpost2) ⇒ BlockFormalsNode
Returns a new instance of BlockFormalsNode.
3170 3171 3172 3173 3174 |
# File 'lib/redparse/node.rb', line 3170 def initialize(goalpost1,param_list,goalpost2) param_list or return super() CommaOpNode===param_list and return super(*Array.new(param_list)) super(param_list) end |
Instance Method Details
#parsetree(o) ⇒ Object
3180 3181 3182 3183 3184 3185 3186 3187 |
# File 'lib/redparse/node.rb', line 3180 def parsetree(o) empty? ? nil : [:dasgn_curr, *map{|x| (VarNode===x) ? x.ident.to_sym : x.parsetree(o) } ] end |
#to_lisp ⇒ Object
3176 3177 3178 |
# File 'lib/redparse/node.rb', line 3176 def to_lisp "(#{data.join' '})" end |