Class: PLang::Parser::Lexer

Inherits:
Object
  • Object
show all
Defined in:
lib/parser/lexer.rb

Instance Method Summary collapse

Constructor Details

#initialize(src) ⇒ Lexer

Returns a new instance of Lexer.



4
5
6
7
8
# File 'lib/parser/lexer.rb', line 4

def initialize(src)
  @line = 1
  @src = src+"\n"
  process()
end

Instance Method Details

#next_tokenObject



10
11
12
# File 'lib/parser/lexer.rb', line 10

def next_token
  @fib.resume
end