File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -290,13 +290,20 @@ def to_ruby
290290 case insn [ 0 ]
291291 when :leave
292292 stack << ReturnNode . new ( arguments : Args . new ( parts : [ stack . pop ] , location : Location . default ) , location : Location . default )
293+ when :opt_mult
294+ left , right = stack . pop ( 2 )
295+ stack << Binary . new ( left : left , operator : :* , right : right , location : Location . default )
293296 when :opt_plus
294297 left , right = stack . pop ( 2 )
295298 stack << Binary . new ( left : left , operator : :+ , right : right , location : Location . default )
296299 when :putobject
297300 case insn [ 1 ]
301+ when Float
302+ stack << FloatLiteral . new ( value : insn [ 1 ] . inspect , location : Location . default )
298303 when Integer
299304 stack << Int . new ( value : insn [ 1 ] . inspect , location : Location . default )
305+ when Rational
306+ stack << RationalLiteral . new ( value : insn [ 1 ] . inspect , location : Location . default )
300307 else
301308 raise "Unknown object type: #{ insn [ 1 ] . class . name } "
302309 end
You can’t perform that action at this time.
0 commit comments