parser 3.0.3.0 → 3.1.1.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
 
@@ -77,6 +77,8 @@ module Parser
77
77
  :duplicate_pattern_key => 'duplicate hash pattern key %{name}',
78
78
  :endless_setter => 'setter method cannot be defined in an endless method definition',
79
79
  :invalid_id_to_get => 'identifier %{identifier} is not valid to get',
80
+ :forward_arg_after_restarg => '... after rest argument',
81
+ :no_anonymous_blockarg => 'no anonymous block parameter',
80
82
 
81
83
  # Parser warnings
82
84
  :useless_else => 'else without rescue is useless',