parser 3.3.0.2 → 3.3.0.4

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 58a6c82a40a850f789d14b614af4ec1bc7f49a20f44d53baa6836753a6e985f4
4
- data.tar.gz: 4bbf94a551f8c1eaa2e1d736aed7b777c84e1ae8103d5d45ba028ab061f426cb
3
+ metadata.gz: f4c06be1f5fd2e6ac1b77b2cf23b50de5f7d3d312652e08a01d9baabc5e6169b
4
+ data.tar.gz: aadb7b705dbb69ada4f4969a0260f7cb0b8a4cca215ee7196a87ac138dfeaa01
5
5
  SHA512:
6
- metadata.gz: 8b96e8cdc46ae221576f522b0bdbfc13a4625f3b3f968279047c1993d9f8d94b233f7f28095d40e9f058a80413ce5f5254b4df26830d93b7cf53e6f4c5e085f6
7
- data.tar.gz: ef0a48ed974cbbbe83ffe2766b793bc441479118f37c5f784c25f9fa96e25e442fd1d7a7b0d9495109fe3ef9992cdb329664d5d439b7fc6b03b4781e58272056
6
+ metadata.gz: b8405daa8407ac30047d46a21a53fd99aa1c06b5d9aad7bb0c1f9712fd870b0ac71d05e19a4c4b47a2d1a654946c78dc356498b308fcfaed616a15dc633f1564
7
+ data.tar.gz: 29129efbf1889905519ea211b695ad1a138719bb3583e6b31692f54bef7508610b8b830a4caa038e9356fe6f517c0914e78ab6e3df855e2659bc28fece75e83c
data/lib/parser/all.rb CHANGED
@@ -14,3 +14,4 @@ require 'parser/ruby30'
14
14
  require 'parser/ruby31'
15
15
  require 'parser/ruby32'
16
16
  require 'parser/ruby33'
17
+ require 'parser/ruby34'
@@ -119,6 +119,15 @@ module Parser
119
119
  require 'parser/ruby33'
120
120
  CurrentRuby = Ruby33
121
121
 
122
+ when /^3\.4\./
123
+ current_version = '3.4.0'
124
+ if RUBY_VERSION != current_version
125
+ warn_syntax_deviation 'parser/ruby34', current_version
126
+ end
127
+
128
+ require 'parser/ruby34'
129
+ CurrentRuby = Ruby34
130
+
122
131
  else # :nocov:
123
132
  # Keep this in sync with released Ruby.
124
133
  warn_syntax_deviation 'parser/ruby33', '3.3.x'
@@ -6,6 +6,7 @@ module Parser
6
6
  class Lexer::Literal
7
7
  DELIMITERS = { '(' => ')', '[' => ']', '{' => '}', '<' => '>' }
8
8
  SPACE = ' '.ord
9
+ TAB = "\t".ord
9
10
 
10
11
  TYPES = {
11
12
  # type start token interpolate?
@@ -247,7 +248,7 @@ module Parser
247
248
  # E
248
249
  # because there are not enough leading spaces in the closing delimiter.
249
250
  delimiter.end_with?(@end_delim) &&
250
- delimiter.sub(/#{Regexp.escape(@end_delim)}\z/, '').bytes.all? { |c| c == SPACE }
251
+ delimiter.sub(/#{Regexp.escape(@end_delim)}\z/, '').bytes.all? { |c| c == SPACE || c == TAB }
251
252
  elsif @indent
252
253
  @end_delim == delimiter.lstrip
253
254
  else