Class: RedParse::KeywordToken

Inherits:
Object
  • Object
show all
Defined in:
lib/redparse.rb,
lib/redparse/node.rb

Direct Known Subclasses

SpecializedKeywordToken

Instance Method Summary collapse

Instance Method Details

#asObject



227
228
229
230
231
232
# File 'lib/redparse/node.rb', line 227

def as
  if tag and ident[/^[,*&]$/]
    tag.to_s+ident
  else old_as
  end
end

#infixObject



234
235
236
# File 'lib/redparse/node.rb', line 234

def infix
  @infix if defined? @infix
end

#not_real!Object



199
200
201
# File 'lib/redparse/node.rb', line 199

def not_real!
  @not_real=true
end

#not_real?Boolean

Returns:

  • (Boolean)


203
204
205
# File 'lib/redparse/node.rb', line 203

def not_real?
  @not_real if defined? @not_real
end

#old_asObject

KeywordToken#as/infix should be in rubylexer



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

alias old_as as

#reducer_identObject



751
752
753
# File 'lib/redparse.rb', line 751

def reducer_ident
  :"KeywordToken_#@ident"
end

#reducer_method(stack) ⇒ Object



748
749
750
# File 'lib/redparse.rb', line 748

def reducer_method(stack)
  :"reduce_with_tos_KeywordToken_#@ident"
end