Class: RedParse::DanglingStarNode

Inherits:
UnaryStarNode show all
Defined in:
lib/redparse/node.rb,
lib/redparse/ReduceWithsFor_RedParse_1_9.rb,
lib/redparse/ReduceWithsFor_RedParse_1_8.rb

Direct Known Subclasses

DanglingCommaNode

Constant Summary

Constants included from FlattenedIvars

FlattenedIvars::EXCLUDED_IVARS

Instance Attribute Summary collapse

Attributes inherited from UnaryStarNode

#after_comma

Attributes inherited from UnOpNode

#lvalue

Attributes inherited from Node

#endline, #errors, #parent, #startline

Attributes included from Stackable::Meta

#boolean_identity_params, #identity_params

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from UnaryStarNode

#all_current_lvars

Methods inherited from UnOpNode

#arg, #arg=, #image, #rip, #to_lisp

Methods inherited from ValueNode

#lvalue, #reducer_method

Methods inherited from Node

#+, #+@, #==, [], #[]=, #add_parent_links!, #args_rip, #begin_parsetree, #classic_inspect, #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, #merge_replacement_session, namelist, #negate, #original_brackets_assign, param_names, #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

#identity_name

Constructor Details

#initialize(star, var = nil) ⇒ DanglingStarNode

param_names :op,:val



1882
1883
1884
1885
1886
# File 'lib/redparse/node.rb', line 1882

def initialize(star,var=nil)
  @offset= star.offset if star.respond_to? :offset
  @startline=@endline=star.startline if star.respond_to? :startline
  super('*@',var||VarNode[''])
end

Instance Attribute Details

#offsetObject (readonly)

Returns the value of attribute offset.



1891
1892
1893
# File 'lib/redparse/node.rb', line 1891

def offset
  @offset
end

Class Method Details

.create(star, var = nil) ⇒ Object



1887
1888
1889
# File 'lib/redparse/node.rb', line 1887

def self.create(star,var=nil)
  DanglingStarNode.new(star,var)
end

Instance Method Details

#lvars_defined_inObject



1892
# File 'lib/redparse/node.rb', line 1892

def lvars_defined_in; [] end

#parsetree(o) ⇒ Object Also known as: lvalue_parsetree



1893
# File 'lib/redparse/node.rb', line 1893

def parsetree(o); [:splat] end

#reducer_identObject



17370
17371
17372
# File 'lib/redparse/ReduceWithsFor_RedParse_1_9.rb', line 17370

def reducer_ident
  :DanglingStarNode
end

#unparse(o = nil) ⇒ Object



1896
# File 'lib/redparse/node.rb', line 1896

def unparse(o=nil); "* "; end