parser 3.1.3.0 → 3.2.1.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: 41190efffa46e773dca6e8579ecca87ded55e3156774838d0e6bea3cec40803e
4
- data.tar.gz: e9219ad92e0da926e964d5f13a00208e772f4f3ba2af7910ac13fd9bf9dcb19b
3
+ metadata.gz: c4e9c12d9347a88fa7fb419e76b338e1d69a647a841be6c2440b0370f6bf3e5f
4
+ data.tar.gz: 2a297a328b99e43ad62241d9c8a5cf1b73f68dcc13ed5afaabbd0028b547c6f5
5
5
  SHA512:
6
- metadata.gz: 786be93811a076e9736a02fccafab91eac37e4d6eab27cdafffc41743ed93e910c84cf073fde0195b7e51e47e1d6868b9673d7c91fbd792ac17428afeabcf68f
7
- data.tar.gz: 472cc7b075befe6502a6f1f543565941cc9d1ffd3c7e5f66f2f21bfed82597cc0a0ad42b8e0f3319321fa9554fbd44a9d375b9a7f226231c7980d8782e5dd23a
6
+ metadata.gz: 330a825c26fdcbc939dd171df1994b5879f38ba896c5130ef70bdf703dd26f374eec9b7511363ff3b84daebf4be9470b836e98b6086725510a14300eea5b8dde
7
+ data.tar.gz: aa843389469df522448da099801725c294852d2641d9bc276319fa7fdd1cbfe1af88c898b7edc821cf948bf4d307617f2c1621c7f0bf3372d9bbef8868a724a1
data/lib/parser/all.rb CHANGED
@@ -13,3 +13,4 @@ require 'parser/ruby27'
13
13
  require 'parser/ruby30'
14
14
  require 'parser/ruby31'
15
15
  require 'parser/ruby32'
16
+ require 'parser/ruby33'
@@ -5,8 +5,8 @@ module Parser
5
5
 
6
6
  ##
7
7
  # {Parser::AST::Node} contains information about a single AST node and its
8
- # child nodes. It extends the basic [AST::Node](http://rdoc.info/gems/ast/AST/Node)
9
- # class provided by gem [ast](http://rdoc.info/gems/ast).
8
+ # child nodes. It extends the basic [AST::Node](https://www.rubydoc.info/gems/ast/AST/Node)
9
+ # class provided by gem [ast](https://www.rubydoc.info/gems/ast).
10
10
  #
11
11
  # @api public
12
12
  #
@@ -540,8 +540,13 @@ module Parser
540
540
  def associate(begin_t, pairs, end_t)
541
541
  0.upto(pairs.length - 1) do |i|
542
542
  (i + 1).upto(pairs.length - 1) do |j|
543
- key1, = *pairs[i]
544
- key2, = *pairs[j]
543
+ pair_i = pairs[i]
544
+ pair_j = pairs[j]
545
+
546
+ next if pair_i.type != :pair || pair_j.type != :pair
547
+
548
+ key1, = *pair_i
549
+ key2, = *pair_j
545
550
 
546
551
  do_warn = false
547
552
 
@@ -3,7 +3,7 @@
3
3
  module Parser
4
4
  class << self
5
5
  def warn_syntax_deviation(feature, version)
6
- warn "warning: parser/current is loading #{feature}, which recognizes" \
6
+ warn "warning: parser/current is loading #{feature}, which recognizes " \
7
7
  "#{version}-compliant syntax, but you are running #{RUBY_VERSION}.\n" \
8
8
  "Please see https://github.com/whitequark/parser#compatibility-with-ruby-mri."
9
9
  end
@@ -102,7 +102,7 @@ module Parser
102
102
  CurrentRuby = Ruby31
103
103
 
104
104
  when /^3\.2\./
105
- current_version = '3.2.0-dev'
105
+ current_version = '3.2.1'
106
106
  if RUBY_VERSION != current_version
107
107
  warn_syntax_deviation 'parser/ruby32', current_version
108
108
  end
@@ -110,10 +110,19 @@ module Parser
110
110
  require 'parser/ruby32'
111
111
  CurrentRuby = Ruby32
112
112
 
113
+ when /^3\.3\./
114
+ current_version = '3.3.0-dev'
115
+ if RUBY_VERSION != current_version
116
+ warn_syntax_deviation 'parser/ruby33', current_version
117
+ end
118
+
119
+ require 'parser/ruby33'
120
+ CurrentRuby = Ruby33
121
+
113
122
  else # :nocov:
114
123
  # Keep this in sync with released Ruby.
115
- warn_syntax_deviation 'parser/ruby31', '3.1.x'
116
- require 'parser/ruby31'
117
- CurrentRuby = Ruby31
124
+ warn_syntax_deviation 'parser/ruby32', '3.2.x'
125
+ require 'parser/ruby32'
126
+ CurrentRuby = Ruby32
118
127
  end
119
128
  end