rubinius-ast 2.2.0 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rubinius/ast/definitions.rb +1 -1
- data/lib/rubinius/ast/operators.rb +9 -1
- data/lib/rubinius/ast/sends.rb +29 -1
- data/lib/rubinius/ast/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6b308177a6c0ff0e59008708b3f6529b2f936276
|
4
|
+
data.tar.gz: c28077607c79e0ad5e2a9f94418fde55a0794213
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 32249255741774d05b8b6db66318d9b6638595b4b7c9958c24c6ef70d857c3457c6aaa342c339e29c05f88ddd423d3e05a3dbdc3f17f0f38b30809e3cc0ae868
|
7
|
+
data.tar.gz: 479dde2dbcac922b17fbd378b3a953f5a95e32239d938658fb9161351ef403ce7554f069ae0231fa3ffaea0f7beb1839dd003131b6b7508ab9e53cf3814f5515
|
@@ -257,7 +257,15 @@ module CodeTools
|
|
257
257
|
end
|
258
258
|
|
259
259
|
def to_sexp
|
260
|
-
arguments = [:arglist]
|
260
|
+
arguments = [:arglist]
|
261
|
+
|
262
|
+
case @arguments
|
263
|
+
when PushArguments
|
264
|
+
arguments << @arguments.to_sexp
|
265
|
+
else
|
266
|
+
arguments += @arguments.to_sexp
|
267
|
+
end
|
268
|
+
|
261
269
|
case @op
|
262
270
|
when :or
|
263
271
|
op = :"||"
|
data/lib/rubinius/ast/sends.rb
CHANGED
@@ -152,7 +152,15 @@ module CodeTools
|
|
152
152
|
end
|
153
153
|
|
154
154
|
def arguments_sexp(name=:arglist)
|
155
|
-
sexp = [name]
|
155
|
+
sexp = [name]
|
156
|
+
|
157
|
+
case @arguments
|
158
|
+
when PushArguments
|
159
|
+
sexp << @arguments.to_sexp
|
160
|
+
else
|
161
|
+
sexp += @arguments.to_sexp
|
162
|
+
end
|
163
|
+
|
156
164
|
sexp << @block.to_sexp if @block
|
157
165
|
sexp
|
158
166
|
end
|
@@ -868,6 +876,26 @@ module CodeTools
|
|
868
876
|
@assignments.bytecode(g)
|
869
877
|
g.state.pop_masgn
|
870
878
|
end
|
879
|
+
|
880
|
+
def to_sexp
|
881
|
+
sexp = [:args]
|
882
|
+
|
883
|
+
case @assignments
|
884
|
+
when ArrayLiteral
|
885
|
+
@assignments.each do |a|
|
886
|
+
case a
|
887
|
+
when Symbol
|
888
|
+
sexp << a
|
889
|
+
when Node
|
890
|
+
sexp << a.to_sexp
|
891
|
+
end
|
892
|
+
end
|
893
|
+
else
|
894
|
+
sexp << @assignments.to_sexp
|
895
|
+
end
|
896
|
+
|
897
|
+
sexp
|
898
|
+
end
|
871
899
|
end
|
872
900
|
|
873
901
|
class Negate < Node
|
data/lib/rubinius/ast/version.rb
CHANGED