Class: RedParse::Token
Instance Attribute Summary collapse
#boolean_identity_params, #identity_params
Instance Method Summary
collapse
build_exemplars, enumerate_exemplars, identity_param
Methods included from Stackable
#identity_name
Instance Attribute Details
#line ⇒ Object
Also known as:
endline
Returns the value of attribute line.
187
188
189
|
# File 'lib/redparse/node.rb', line 187
def line
@line
end
|
#startline ⇒ Object
191
192
193
|
# File 'lib/redparse/node.rb', line 191
def startline
@startline||=endline
end
|
Instance Method Details
#begin_parsetree(o) ⇒ Object
185
|
# File 'lib/redparse/node.rb', line 185
def begin_parsetree(o); parsetree(o) end
|
#data ⇒ Object
182
|
# File 'lib/redparse/node.rb', line 182
def data; [self] end
|
#image ⇒ Object
167
|
# File 'lib/redparse/node.rb', line 167
def image; "#{inspect}" end
|
#lvalue ⇒ Object
181
|
# File 'lib/redparse/node.rb', line 181
def lvalue; nil end
|
#rescue_parsetree(o) ⇒ Object
184
|
# File 'lib/redparse/node.rb', line 184
def rescue_parsetree(o); parsetree(o) end
|
#to_parsetree(*options) ⇒ Object
this shouldn’t be needed anymore
169
170
171
172
173
174
175
176
177
178
179
180
|
# File 'lib/redparse/node.rb', line 169
def to_parsetree(*options) o={}
[:newlines,:quirks,:ruby187].each{|opt|
o[opt]=true if options.include? opt
}
result=[parsetree(o)]
result=[] if result==[[]]
return result
end
|
#unary ⇒ Object
183
|
# File 'lib/redparse/node.rb', line 183
def unary; false end
|