class RedParse::ListInNode::LookupNode
Attributes
lvalue[W]
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
RedParse::ListInNode::ListOpNode::new
# File lib/redparse/node.rb, line 1914 def initialize(*args) @offset=args.first.offset args.unshift nil if args.size==2 args.map!{|node| if VarNode===node and (?A..?Z)===node.ident[0] then node.ident else node end } super(*args) end
Public Instance Methods
inspect(label=nil,indent=0,verbose=false)
click to toggle source
# File lib/redparse/node.rb, line 1959 def inspect label=nil,indent=0,verbose=false result=' '*indent result+="#{label}: " if label result+='Constant ' unless String===first or nil==first head=first rest=self[1..-1] end result+=(rest||self).map{|name| name.inspect}.join(', ')+"\n" result+=head.inspect("head",indent+2,verbose) if head return result end
lvalue()
click to toggle source
# File lib/redparse/node.rb, line 1952 def lvalue return @lvalue if defined? @lvalue @lvalue=true end
lvalue_parsetree(o)
click to toggle source
# File lib/redparse/node.rb, line 1934 def lvalue_parsetree(o) [:cdecl,parsetree(o)] end
parsetree(o)
click to toggle source
# File lib/redparse/node.rb, line 1937 def parsetree(o) if !first result=[:colon3, self[1].to_sym] i=2 else result=first.respond_to?(:parsetree) ? first.parsetree(o) : [:const,first.to_sym] i=1 end (i...size).inject(result){|r,j| [:colon2, r, self[j].to_sym] } end
unparse(o=default_unparse_options)
click to toggle source
# File lib/redparse/node.rb, line 1925 def unparse(o=default_unparse_options) if Node===first result=dup result[0]= first.unparse(o)#.gsub(/\s+\Z/,'') result.join('::') else join('::') end end
Also aliased as: image