parser 3.0.2.0 → 3.1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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
 
@@ -76,9 +76,13 @@ module Parser
76
76
  :duplicate_variable_name => 'duplicate variable name %{name}',
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
+ :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',
79
82
 
80
83
  # Parser warnings
81
84
  :useless_else => 'else without rescue is useless',
85
+ :duplicate_hash_key => 'key is duplicated and overwritten',
82
86
 
83
87
  # Parser errors that are not Ruby errors
84
88
  :invalid_encoding => 'literal contains escape sequences incompatible with UTF-8',