lib/antelope/generator/output.rb in antelope-0.1.8 vs lib/antelope/generator/output.rb in antelope-0.1.9
- old
+ new
@@ -1,18 +1,18 @@
# encoding: utf-8
-require "pp"
-
module Antelope
module Generator
# Generates an output file, mainly for debugging. Included always
# as a generator for a grammar.
class Output < Base
register_as "output"
+ has_directive "output.show-lookahead", Boolean
+
# Defines singleton method for every mod that the grammar passed
# to the generator.
#
# @see Generator#initialize
def initialize(*)
@@ -40,10 +40,10 @@
# Actually performs the generation. Uses the template in
# output.erb, and generates the file `<file>.output`.
#
# @return [void]
def generate
- template "output.erb", "#{file}.output"
+ template "output", "#{file}.output"
end
end
end
end