Class: RedParse::VarLikeNode
- Defined in:
- lib/redparse/node.rb,
lib/redparse/node.rb,
lib/redparse/ReduceWithsFor_RedParse_1_9.rb,
lib/redparse/ReduceWithsFor_RedParse_1_8.rb
Overview
nil,false,true,__FILE__,__LINE__,self
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
Class Method Summary collapse
Instance Method Summary collapse
- #image ⇒ Object
-
#initialize(name, *more) ⇒ VarLikeNode
constructor
A new instance of VarLikeNode.
- #parsetree(o) ⇒ Object
- #reducer_ident ⇒ Object
- #to_lisp ⇒ Object
- #unparse(o = default_unparse_options) ⇒ Object
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(name, *more) ⇒ VarLikeNode
4201 4202 4203 4204 4205 |
# File 'lib/redparse/node.rb', line 4201 def initialize(name,*more) @offset=name.offset replace [name.ident] @value=name.respond_to?(:value) && name.value end |
Class Method Details
.new(name, *more) ⇒ Object
4194 4195 4196 4197 4198 4199 4200 |
# File 'lib/redparse/node.rb', line 4194 def self.new(name,*more) if name.ident=='(' #shouldn't happen now, AFAICT ParenedNode.new else super end end |
Instance Method Details
#image ⇒ Object
4209 |
# File 'lib/redparse/node.rb', line 4209 def image; "(#{name})" end |
#parsetree(o) ⇒ Object
4219 4220 4221 4222 4223 4224 4225 4226 4227 4228 4229 4230 4231 |
# File 'lib/redparse/node.rb', line 4219 def parsetree(o) if (defined? @value) and @value type=:lit val=@value if name=="__FILE__" type=:str val="(string)" if val=="-" end [type,val] else [name.to_sym] end end |
#reducer_ident ⇒ Object
17610 17611 17612 |
# File 'lib/redparse/ReduceWithsFor_RedParse_1_9.rb', line 17610 def reducer_ident :VarLikeNode end |
#to_lisp ⇒ Object
4211 4212 4213 |
# File 'lib/redparse/node.rb', line 4211 def to_lisp name end |
#unparse(o = default_unparse_options) ⇒ Object
4215 4216 4217 |
# File 'lib/redparse/node.rb', line 4215 def unparse o= name end |