Class: RedParse::AssignmentRhsNode
- Defined in:
- lib/redparse/node.rb,
lib/redparse/ReduceWithsFor_RedParse_1_9.rb,
lib/redparse/ReduceWithsFor_RedParse_1_8.rb
Overview
not to appear in final parse tree
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(*args) ⇒ AssignmentRhsNode
constructor
A new instance of AssignmentRhsNode.
-
#is_list ⇒ Object
WITHCOMMAS=UnaryStarNode|CommaOpNode|(CallSiteNode&-:with_commas=>true).
- #reducer_ident ⇒ Object
- #reducer_method(stack) ⇒ Object
Methods inherited from Node
#+, #+@, #==, [], #[]=, #add_parent_links!, #args_rip, #begin_parsetree, #classic_inspect, create, #data, #deep_copy, #delete_extraneous_ivars!, #delete_linenums!, #depthwalk, #depthwalk_nodes, #error?, #evalable_inspect, #fixup_multiple_assignments!, #fixup_rescue_assignments!, #force_stmt_list_rip, #image, #initialize_ivars, inline_symbols, #inspect, #lhs_unparse, #linerange, #lvalue, #lvars_defined_in, #merge_replacement_session, namelist, #negate, #original_brackets_assign, param_names, #parsetree, #parsetrees, #pretty_print, #prohibit_fixup, #replace_ivars_and_self, #replace_value, #rescue_parsetree, #rfind, #rfind_all, #rgrep, #rip_and_rescues, #rip_explode!, #short_inspect, #stmts_rip, #to_parsetree, #to_parsetree_and_warnings, #to_ruby, #to_s, #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(*args) ⇒ AssignmentRhsNode
Returns a new instance of AssignmentRhsNode.
2310 2311 2312 2313 2314 |
# File 'lib/redparse/node.rb', line 2310 def initialize(*args) if args.size==1; super args.first else super args[1] end end |
Instance Method Details
#is_list ⇒ Object
WITHCOMMAS=UnaryStarNode|CommaOpNode|(CallSiteNode&-:with_commas=>true)
2316 2317 2318 2319 2320 2321 2322 2323 2324 2325 2326 |
# File 'lib/redparse/node.rb', line 2316 def is_list return !(WITHCOMMAS===val) =begin #this should be equivalent, why doesn't it work? !(UnaryStarNode===val or CommaOpNode===val or CallSiteNode===val && val.with_commas==true) # CallSiteNode===val && !val.real_parens && val.args.size>0 =end end |
#reducer_ident ⇒ Object
17216 17217 17218 |
# File 'lib/redparse/ReduceWithsFor_RedParse_1_9.rb', line 17216 def reducer_ident :AssignmentRhsNode end |
#reducer_method(stack) ⇒ Object
17213 17214 17215 |
# File 'lib/redparse/ReduceWithsFor_RedParse_1_9.rb', line 17213 def reducer_method(stack) :reduce_with_tos_AssignmentRhsNode end |