Class: Deadfire::FrontEnd::Scanner
- Inherits:
-
Object
- Object
- Deadfire::FrontEnd::Scanner
- Defined in:
- lib/deadfire/front_end/scanner.rb
Instance Method Summary collapse
-
#initialize(source, error_reporter) ⇒ Scanner
constructor
A new instance of Scanner.
- #tokenize ⇒ Object
Constructor Details
#initialize(source, error_reporter) ⇒ Scanner
Returns a new instance of Scanner.
6 7 8 9 10 11 12 13 14 |
# File 'lib/deadfire/front_end/scanner.rb', line 6 def initialize(source, error_reporter) @source = source @total_chars = @source.length @tokens = [] @start = 0 @current = 0 @line = 1 @error_reporter = error_reporter end |