summaryrefslogtreecommitdiff
path: root/ext/ripper
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-19 16:24:07 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-19 16:24:07 +0000
commit193b158b2320c8dc4ef6368965300d84c152e125 (patch)
tree7073ef1496e43646fe04f3d3db63f831f4f4859c /ext/ripper
parenta64054cd343d53f84efb88794d6cb12a8b676a69 (diff)
parse.y: Remove double meaning of backref_assign_error
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/ripper')
-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 6b4742f..524c0e8 100644
--- a/ext/ripper/tools/dsl.rb
+++ b/ext/ripper/tools/dsl.rb
@@ -9,6 +9,7 @@ class DSL
@error = options.include?("error")
@brace = options.include?("brace")
@final = options.include?("final")
+ @var_field_1 = options.include?("var_field_1")
# create $1 == "$1", $2 == "$2", ...
re, s = "", ""
@@ -33,6 +34,7 @@ class DSL
s = "\t\t\t#{ s } = #@code;"
s << "ripper_error(p);" if @error
s = "{#{ s }}" if @brace
+ s = "$1 = var_field(p, $1);" + s if @var_field_1
s
end