parser 2.6.2.0 → 2.6.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f73d99b2de768fdd414f46cd0690ae47d94f27255c6abec8ace559142670f497
4
- data.tar.gz: a05a8c9387337c240885b07c1efd17c1b765a1a4a040702335d5530a35dce64f
3
+ metadata.gz: '079e9a23e1c61dbd3964edff00120c9d9df0993aee3b1a0070a64c1b717a1450'
4
+ data.tar.gz: f42199a0777690e615515ca481ee2bf56aa3c5090d9702e65ae19c1db8fb499a
5
5
  SHA512:
6
- metadata.gz: a2d25463cff92bbd69ad923aef6fb08b5888ad647ffdc98bb71d45535da82db144c02d247b60a0a97ca4772b3ae9e8aa20e9c21358efc0dd9445405d02191ada
7
- data.tar.gz: d62e5f2932d1eeecebc5396676cfb7e3b101c275f60c85afb8dffde6d45766432380a4f6e38ca19f86db072a4b1821e2e2bfe6c0e243304d12914c8247734469
6
+ metadata.gz: ca3de4d39f2c9e67366c22c9a2c5640efcbbee28cb3b0ed030425de55806dd03580d9111195eb9e66f65189638ee5935adb94441a4018e2e0901c66d450e18a7
7
+ data.tar.gz: c29b708ab12eef3c14f2f472b152e1adf090481a3127a10c9bdb4a24cb34849e4f00bbdf14f97e71916157dce66c6d74faa9658603a95db82e246c92d68bf15b
@@ -11,8 +11,8 @@ matrix:
11
11
  - name: 2.3.8 / Parser tests
12
12
  rvm: 2.3.8
13
13
  script: bundle exec rake test_cov
14
- - name: 2.4.5 / Parser tests
15
- rvm: 2.4.5
14
+ - name: 2.4.6 / Parser tests
15
+ rvm: 2.4.6
16
16
  script: bundle exec rake test_cov
17
17
  - name: 2.5.5 / Parser tests
18
18
  rvm: 2.5.5
@@ -1,9 +1,16 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
- Not released (2019-03-21)
4
+ Not released (2019-04-05)
5
5
  -------------------------
6
6
 
7
+ API modifications:
8
+ * Bump 2.4 branch to 2.4.6. (#569) (Ilya Bylich)
9
+ * Lexer should know about current parsing context. (#566) (Ilya Bylich)
10
+
11
+ v2.6.2.0 (2019-03-21)
12
+ ---------------------
13
+
7
14
  API modifications:
8
15
  * Bump ruby versions to 2.5.5 and 2.6.2. (#563) (Ilya Bylich)
9
16
  * Bump Ruby version to 2.6.1. (#554) (Ilya Bylich)
@@ -123,13 +123,16 @@ module Parser
123
123
 
124
124
  @static_env = StaticEnvironment.new
125
125
 
126
+ # Stack that holds current parsing context
127
+ @context = Context.new
128
+
126
129
  @lexer = Lexer.new(version)
127
130
  @lexer.diagnostics = @diagnostics
128
131
  @lexer.static_env = @static_env
132
+ @lexer.context = @context
129
133
 
130
134
  @builder = builder
131
135
  @builder.parser = self
132
- @context = Context.new
133
136
 
134
137
  # Last emitted token
135
138
  @last_token = nil
@@ -48,7 +48,7 @@ module Parser
48
48
  CurrentRuby = Ruby23
49
49
 
50
50
  when /^2\.4\./
51
- current_version = '2.4.5'
51
+ current_version = '2.4.6'
52
52
  if RUBY_VERSION != current_version
53
53
  warn_syntax_deviation 'parser/ruby24', current_version
54
54
  end
@@ -85,8 +85,8 @@ module Parser
85
85
 
86
86
  else # :nocov:
87
87
  # Keep this in sync with released Ruby.
88
- warn_syntax_deviation 'parser/ruby25', '2.5.x'
89
- require 'parser/ruby25'
90
- CurrentRuby = Ruby25
88
+ warn_syntax_deviation 'parser/ruby26', '2.6.x'
89
+ require 'parser/ruby26'
90
+ CurrentRuby = Ruby26
91
91
  end
92
92
  end
@@ -95,13 +95,14 @@ class Parser::Lexer
95
95
  attr_accessor :static_env
96
96
  attr_accessor :force_utf32
97
97
 
98
- attr_accessor :cond, :cmdarg, :in_kwarg
98
+ attr_accessor :cond, :cmdarg, :in_kwarg, :context
99
99
 
100
100
  attr_accessor :tokens, :comments
101
101
 
102
102
  def initialize(version)
103
103
  @version = version
104
104
  @static_env = nil
105
+ @context = nil
105
106
 
106
107
  @tokens = nil
107
108
  @comments = nil
@@ -23,6 +23,9 @@ module Parser
23
23
  until_post for break next redo return resbody
24
24
  kwbegin begin retry preexe postexe iflipflop eflipflop
25
25
  shadowarg complex rational __FILE__ __LINE__ __ENCODING__
26
+ ident root lambda indexasgn index procarg0
27
+ meth_ref restarg_expr blockarg_expr
28
+ objc_kwarg objc_restarg objc_varargs
26
29
  ).map(&:to_sym).to_set.freeze
27
30
 
28
31
  end # Meta
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Parser
4
- VERSION = '2.6.2.0'
4
+ VERSION = '2.6.2.1'
5
5
  end
@@ -50,3 +50,10 @@ require 'minitest/autorun'
50
50
 
51
51
  $LOAD_PATH.unshift(File.expand_path('../../lib', __FILE__))
52
52
  require 'parser'
53
+
54
+ class Parser::AST::Node
55
+ def initialize(type, *)
56
+ raise "Type #{type} missing from Parser::Meta::NODE_TYPES" unless Parser::Meta::NODE_TYPES.include?(type)
57
+ super
58
+ end
59
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.2.0
4
+ version: 2.6.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - whitequark
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-03-20 00:00:00.000000000 Z
11
+ date: 2019-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast