Class: LanguageParser::Token

Inherits:
Object
  • Object
show all
Defined in:
lib/cgialib/lp/Tokenizer.rb

Direct Known Subclasses

CodeToken, CommentToken, WhitespaceToken

Instance Method Summary collapse

Constructor Details

#initialize(text) ⇒ Token

initialize( text )

text - The text of the token

Initialieze the token with it’s text



19
# File 'lib/cgialib/lp/Tokenizer.rb', line 19

def initialize( text ) @text = text; end

Instance Method Details

#to_sObject

to_s()

Overload of the to-string method to return the text of the token



26
# File 'lib/cgialib/lp/Tokenizer.rb', line 26

def to_s() @text; end