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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 21f544e53eebc01259b5fdeaf66a71a9febae025
4
- data.tar.gz: 12844da7fb6ed0d03fec4a8e4f2b02b82cdab036
3
+ metadata.gz: ac4eb82e6fd15f277aa857c278d80684dc5b349b
4
+ data.tar.gz: ed75c6f998c25d0f72e0f54cd8506cd0854e36d7
5
5
  SHA512:
6
- metadata.gz: 65f4b3582acb2604619b577d5a9998975425cfbe10bc7c9eab58c5722ec10d6b266d9e3a52871736465e9366bade8a7be13645d7ac4ed801d2d2935a480b4a78
7
- data.tar.gz: 88767c6a3dfc1a5ba2c4503cd01e41e2a368e90cdc31edd52a410aba4ba8a1a610b0a252a3e56ac69784ee02ef556e7f6c40af39009781a2ef6f89a96cee035d
6
+ metadata.gz: acddf27f3fee5d79b6716301afd5482d092679dfad471d86f7453558f9a13c4b3d4cb219926fe140767a0c744c10d153c540c9991bab0879adc829484ab9fe72
7
+ data.tar.gz: 82f62af04e2d9e249863730c98f7ce55f1aecc4abacc7184cd4a5169d47e41da40a805fd6e3222352aba9683012b482837837844e8c1a4641181649a15bb8f18
@@ -1,6 +1,12 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ v2.1.7 (2014-03-05)
5
+ -------------------
6
+
7
+ Bugs fixed:
8
+ * lexer.rl: make sure all invalid escapes lead to fatal errors (fixes #136). (Peter Zotov)
9
+
4
10
  v2.1.6 (2014-03-04)
5
11
  -------------------
6
12
 
@@ -647,7 +647,7 @@ class Parser::Lexer
647
647
 
648
648
  action invalid_complex_escape {
649
649
  @escape = lambda do
650
- diagnostic :error, :invalid_escape
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 :error, :invalid_hex_escape, nil,
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 :error, :invalid_unicode_escape, nil,
705
+ diagnostic :fatal, :invalid_unicode_escape, nil,
706
706
  range(@escape_s - 1, p)
707
707
  end
708
708
  }
@@ -1,3 +1,3 @@
1
1
  module Parser
2
- VERSION = '2.1.6'
2
+ VERSION = '2.1.7'
3
3
  end
@@ -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.6
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-04 00:00:00.000000000 Z
11
+ date: 2014-03-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ast