Class: Crokus::Ident

Inherits:
Ast
  • Object
show all
Defined in:
lib/crokus/ast.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Ast

#accept, #str

Constructor Details

#initialize(tok) ⇒ Ident

Returns a new instance of Ident.



31
32
33
# File 'lib/crokus/ast.rb', line 31

def initialize tok
  @tok=tok
end

Instance Attribute Details

#tokObject

Returns the value of attribute tok.



30
31
32
# File 'lib/crokus/ast.rb', line 30

def tok
  @tok
end

Class Method Details

.create(str) ⇒ Object



39
40
41
# File 'lib/crokus/ast.rb', line 39

def self.create str
  Ident.new(Token.create(str))
end

Instance Method Details

#to_sObject



35
36
37
# File 'lib/crokus/ast.rb', line 35

def to_s
  @tok.val
end