parser 2.1.6 → 2.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/lib/parser/lexer.rl +3 -3
- data/lib/parser/version.rb +1 -1
- data/test/test_lexer.rb +4 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac4eb82e6fd15f277aa857c278d80684dc5b349b
|
4
|
+
data.tar.gz: ed75c6f998c25d0f72e0f54cd8506cd0854e36d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: acddf27f3fee5d79b6716301afd5482d092679dfad471d86f7453558f9a13c4b3d4cb219926fe140767a0c744c10d153c540c9991bab0879adc829484ab9fe72
|
7
|
+
data.tar.gz: 82f62af04e2d9e249863730c98f7ce55f1aecc4abacc7184cd4a5169d47e41da40a805fd6e3222352aba9683012b482837837844e8c1a4641181649a15bb8f18
|
data/CHANGELOG.md
CHANGED
data/lib/parser/lexer.rl
CHANGED
@@ -647,7 +647,7 @@ class Parser::Lexer
|
|
647
647
|
|
648
648
|
action invalid_complex_escape {
|
649
649
|
@escape = lambda do
|
650
|
-
diagnostic :
|
650
|
+
diagnostic :fatal, :invalid_escape
|
651
651
|
end
|
652
652
|
}
|
653
653
|
|
@@ -687,7 +687,7 @@ class Parser::Lexer
|
|
687
687
|
| 'x' ( c_any - xdigit )
|
688
688
|
% {
|
689
689
|
@escape = lambda do
|
690
|
-
diagnostic :
|
690
|
+
diagnostic :fatal, :invalid_hex_escape, nil,
|
691
691
|
range(@escape_s - 1, p + 2)
|
692
692
|
end
|
693
693
|
}
|
@@ -702,7 +702,7 @@ class Parser::Lexer
|
|
702
702
|
)
|
703
703
|
% {
|
704
704
|
@escape = lambda do
|
705
|
-
diagnostic :
|
705
|
+
diagnostic :fatal, :invalid_unicode_escape, nil,
|
706
706
|
range(@escape_s - 1, p)
|
707
707
|
end
|
708
708
|
}
|
data/lib/parser/version.rb
CHANGED
data/test/test_lexer.rb
CHANGED
@@ -63,10 +63,11 @@ class TestLexer < Minitest::Test
|
|
63
63
|
end
|
64
64
|
|
65
65
|
def refute_escape(input)
|
66
|
-
assert_raises Parser::SyntaxError do
|
66
|
+
err = assert_raises Parser::SyntaxError do
|
67
67
|
@lex.state = :expr_beg
|
68
68
|
assert_scanned "%Q[\\#{input}]"
|
69
69
|
end
|
70
|
+
assert_equal :fatal, err.diagnostic.level
|
70
71
|
end
|
71
72
|
|
72
73
|
def assert_lex_fname(name, type)
|
@@ -145,6 +146,8 @@ class TestLexer < Minitest::Test
|
|
145
146
|
refute_escape "C-"
|
146
147
|
|
147
148
|
refute_escape "c"
|
149
|
+
|
150
|
+
refute_escape "x"
|
148
151
|
end
|
149
152
|
|
150
153
|
def test_read_escape_unicode__19
|
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.1.
|
4
|
+
version: 2.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Zotov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ast
|