Class: Astrapi::Identifier

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

Overview

.….….….….….….…..

Instance Method Summary collapse

Methods inherited from Ast

#accept

Constructor Details

#initialize(tok) ⇒ Identifier

Returns a new instance of Identifier.



51
52
53
# File 'lib/ast.rb', line 51

def initialize tok
  @tok=tok
end

Instance Method Details

#==(other) ⇒ Object



63
64
65
# File 'lib/ast.rb', line 63

def ==(other)
  str==other.str
end

#strObject



55
56
57
# File 'lib/ast.rb', line 55

def str
  @tok.val.to_s
end

#to_sObject



59
60
61
# File 'lib/ast.rb', line 59

def to_s
  str
end