Class: Fictive::Text::Compiler

Inherits:
Object
  • Object
show all
Defined in:
lib/fictive/text/compiler.rb

Instance Method Summary collapse

Constructor Details

#initialize(input) ⇒ Compiler

Returns a new instance of Compiler.



6
7
8
# File 'lib/fictive/text/compiler.rb', line 6

def initialize(input)
  @input = input
end

Instance Method Details

#process(symbol_table = {}) ⇒ Object



10
11
12
13
14
15
# File 'lib/fictive/text/compiler.rb', line 10

def process(symbol_table={})
  @symbol_table = symbol_table
  @scanner = StringScanner.new(@input)

  Fictive::Text::Node.new(*parse_fragments)
end