parser 3.0.3.2 → 3.1.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -35,21 +35,21 @@ module Parser
35
35
  end
36
36
 
37
37
  def top
38
- @stack.last
38
+ @stack.last[:value]
39
39
  end
40
40
 
41
- def push
42
- @stack.push(0)
41
+ def push(static:)
42
+ @stack.push(value: 0, static: static)
43
43
  end
44
44
 
45
45
  def pop
46
- @stack.pop
46
+ @stack.pop[:value]
47
47
  end
48
48
 
49
49
  private
50
50
 
51
51
  def set(value)
52
- @stack[@stack.length - 1] = value
52
+ @stack.last[:value] = value
53
53
  end
54
54
  end
55
55