summaryrefslogtreecommitdiff
path: root/ext/ripper/tools/dsl.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/ripper/tools/dsl.rb')
-rw-r--r--ext/ripper/tools/dsl.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/ext/ripper/tools/dsl.rb b/ext/ripper/tools/dsl.rb
index dec4820d74c..6b4742f17c7 100644
--- a/ext/ripper/tools/dsl.rb
+++ b/ext/ripper/tools/dsl.rb
@@ -8,6 +8,7 @@ class DSL
@events = {}
@error = options.include?("error")
@brace = options.include?("brace")
+ @final = options.include?("final")
# create $1 == "$1", $2 == "$2", ...
re, s = "", ""
@@ -28,6 +29,7 @@ class DSL
def generate
s = "$$"
+ s = "p->result" if @final
s = "\t\t\t#{ s } = #@code;"
s << "ripper_error(p);" if @error
s = "{#{ s }}" if @brace