Class: RedParse::DoubleColonNode
- Defined in:
- lib/redparse/node.rb,
lib/redparse/ReduceWithsFor_RedParse_1_9.rb,
lib/redparse/ReduceWithsFor_RedParse_1_8.rb
Overview
obsolete
Constant Summary
Constants included from FlattenedIvars
FlattenedIvars::EXCLUDED_IVARS
Instance Attribute Summary collapse
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(val1, op, val2 = nil) ⇒ DoubleColonNode
constructor
A new instance of DoubleColonNode.
- #lvalue_parsetree(o) ⇒ Object
- #parsetree(o) ⇒ Object
- #reducer_ident ⇒ 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, #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(val1, op, val2 = nil) ⇒ DoubleColonNode
Returns a new instance of DoubleColonNode.
1979 1980 1981 1982 1983 1984 |
# File 'lib/redparse/node.rb', line 1979 def initialize(val1,op,val2=nil) val1,op,val2=nil,val1,op unless val2 val1=val1.ident if VarNode===val1 and /\A#{UCLETTER}/o===val1.ident val2=val2.ident if VarNode===val1 and /\A#{UCLETTER}/o===val2.ident replace [val1,val2] end |
Instance Attribute Details
#lvalue ⇒ Object
2001 2002 2003 2004 |
# File 'lib/redparse/node.rb', line 2001 def lvalue return @lvalue if defined? @lvalue @lvalue=true end |
Instance Method Details
#image ⇒ Object
1986 |
# File 'lib/redparse/node.rb', line 1986 def image; '(::)' end |
#lvalue_parsetree(o) ⇒ Object
1997 1998 1999 |
# File 'lib/redparse/node.rb', line 1997 def lvalue_parsetree(o) [:cdecl,parsetree(o)] end |
#parsetree(o) ⇒ Object
1989 1990 1991 1992 1993 1994 1995 1996 |
# File 'lib/redparse/node.rb', line 1989 def parsetree(o) if namespace ns= (String===namespace) ? [:const,namespace.to_sym] : namespace.parsetree(o) [:colon2, ns, constant.to_sym] else [:colon3, constant.to_sym] end end |
#reducer_ident ⇒ Object
17540 17541 17542 |
# File 'lib/redparse/ReduceWithsFor_RedParse_1_9.rb', line 17540 def reducer_ident :DoubleColonNode end |