Class: RedParse::Token

Inherits:
Object
  • Object
show all
Extended by:
Stackable::Meta
Includes:
Stackable
Defined in:
lib/redparse/node.rb

Direct Known Subclasses

GoalPostToken, StartToken

Instance Attribute Summary

Attributes included from Stackable::Meta

#boolean_identity_params, #identity_params

Instance Method Summary collapse

Methods included from Stackable::Meta

build_exemplars, enumerate_exemplars, identity_param

Methods included from Stackable

#identity_name

Instance Method Details

#begin_parsetree(o) ⇒ Object



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

def begin_parsetree(o); parsetree(o) end

#dataObject



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

def data; [self] end

#imageObject



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

def image; "#{inspect}" end

#lvalueObject



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

def lvalue; nil end

#rescue_parsetree(o) ⇒ Object



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

def rescue_parsetree(o); parsetree(o) end

#short_inspectObject



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

def short_inspect; inspect+"\n" end

#to_parsetree(*options) ⇒ Object

this shouldn’t be needed anymore



171
172
173
174
175
176
177
178
179
180
181
182
# File 'lib/redparse/node.rb', line 171

def to_parsetree(*options) #this shouldn't be needed anymore
  o={}
  [:newlines,:quirks,:ruby187].each{|opt| 
    o[opt]=true if options.include? opt
  }

  result=[parsetree(o)] 

  result=[] if result==[[]]

  return result
end

#unaryObject



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

def unary; false end