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 +4 -4
- data/lib/parser/all.rb +1 -0
- data/lib/parser/current.rb +9 -0
- data/lib/parser/lexer/literal.rb +2 -1
- data/lib/parser/ruby34.rb +12589 -0
- data/lib/parser/runner.rb +5 -0
- data/lib/parser/version.rb +1 -1
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f4c06be1f5fd2e6ac1b77b2cf23b50de5f7d3d312652e08a01d9baabc5e6169b
|
4
|
+
data.tar.gz: aadb7b705dbb69ada4f4969a0260f7cb0b8a4cca215ee7196a87ac138dfeaa01
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b8405daa8407ac30047d46a21a53fd99aa1c06b5d9aad7bb0c1f9712fd870b0ac71d05e19a4c4b47a2d1a654946c78dc356498b308fcfaed616a15dc633f1564
|
7
|
+
data.tar.gz: 29129efbf1889905519ea211b695ad1a138719bb3583e6b31692f54bef7508610b8b830a4caa038e9356fe6f517c0914e78ab6e3df855e2659bc28fece75e83c
|
data/lib/parser/all.rb
CHANGED
data/lib/parser/current.rb
CHANGED
@@ -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'
|
data/lib/parser/lexer/literal.rb
CHANGED
@@ -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
|