summaryrefslogtreecommitdiff
path: root/ext/ripper
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 06:11:21 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-20 06:11:21 +0000
commit9e9551378171f33a6dea7d90c79eaf2dafe8fb1e (patch)
treeeeaf5e4fcfd437a3eae05e30e6d73e3ef61e3d3c /ext/ripper
parenta8a4bdb72ed3e16dfb7cb216c5b22b16630b23b4 (diff)
parse.y: Remove unneeded var_field_1 trick
I thought this trick was needed because the result of var_field was passed to different arguments, as follows: ``` $1 = var_field(p, $1); $$ = backref_assign_error(p, $1, $1, &@$); ``` Currently the DSL supports that one result is passed to one argument. However, after the refactoring, I found that `backref_assign_error` uses only one `$1`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61979 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/ripper')
-rw-r--r--ext/ripper/tools/dsl.rb2
1 files changed, 0 insertions, 2 deletions
diff --git a/ext/ripper/tools/dsl.rb b/ext/ripper/tools/dsl.rb
index 3857ec0702..c4c5a36e27 100644
--- a/ext/ripper/tools/dsl.rb
+++ b/ext/ripper/tools/dsl.rb
@@ -9,7 +9,6 @@ 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 = "", ""
@@ -37,7 +36,6 @@ class DSL
s = "#{ s } = #@code;"
s << "ripper_error(p);" if @error
s = "{#{ s }}" if @brace
- s = "$1 = var_field(p, $1);" + s if @var_field_1
"\t\t\t#{s}"
end