Class: PLang::Parser::Lexer
- Inherits:
-
Object
- Object
- PLang::Parser::Lexer
- Defined in:
- lib/parser/lexer.rb
Instance Method Summary collapse
-
#initialize(src) ⇒ Lexer
constructor
A new instance of Lexer.
- #next_token ⇒ Object
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_token ⇒ Object
10 11 12 |
# File 'lib/parser/lexer.rb', line 10 def next_token @fib.resume end |