Class: RedParse::UndefNode
- Includes:
- BareSymbolUtils
- Defined in:
- lib/redparse/node.rb,
lib/redparse/ReduceWithsFor_RedParse_1_9.rb,
lib/redparse/ReduceWithsFor_RedParse_1_8.rb
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
- #image ⇒ Object
-
#initialize(first, middle, last = nil) ⇒ UndefNode
constructor
A new instance of UndefNode.
- #parsetree(o) ⇒ Object
- #reducer_ident ⇒ Object
- #unparse(o = default_unparse_options) ⇒ Object
Methods included from BareSymbolUtils
#baresym2str, #str2parsetree, #str_unparse
Methods inherited from ValueNode
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, #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, #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(first, middle, last = nil) ⇒ UndefNode
Returns a new instance of UndefNode.
5026 5027 5028 5029 5030 5031 5032 5033 5034 |
# File 'lib/redparse/node.rb', line 5026 def initialize(first,middle,last=nil) @offset=first.offset if last node,newsym=first,last super(*node << (newsym)) else super((middle)) end end |
Instance Method Details
#image ⇒ Object
5036 |
# File 'lib/redparse/node.rb', line 5036 def image; "(undef)" end |
#parsetree(o) ⇒ Object
5042 5043 5044 5045 5046 5047 5048 5049 |
# File 'lib/redparse/node.rb', line 5042 def parsetree(o) result=map{|name| [:undef, str2parsetree(name,o)] } if result.size==1 result.first else result.unshift :block end end |
#reducer_ident ⇒ Object
17595 17596 17597 |
# File 'lib/redparse/ReduceWithsFor_RedParse_1_9.rb', line 17595 def reducer_ident :UndefNode end |
#unparse(o = default_unparse_options) ⇒ Object
5038 5039 5040 |
# File 'lib/redparse/node.rb', line 5038 def unparse o= "undef #{map{|name| str_unparse name,o}.join(', ')}" end |