hcl-checker 1.0.5 → 1.0.6

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
  SHA1:
3
- metadata.gz: 8b2ea8567305e0dfa10761345da6129798b1cdc2
4
- data.tar.gz: 5c31f865563f0268cd288e8a73fb37fd2dff8d49
3
+ metadata.gz: d1efd195e8ca8b8db483856773b83144bc9137c2
4
+ data.tar.gz: e2bf9f4f3c1ea37361e5df981316b7849bf74c5e
5
5
  SHA512:
6
- metadata.gz: c4fdaf59be28ffa057a8c297e8d17c46829c0d14abd5ac2ad5ca2c40ad65349497005108b4fb11eef38ee9fa7777d3710c5ba44c7b697cc44736ead30a321ddf
7
- data.tar.gz: 36c6ec52a33950523ff3d9af72e1993a4aa20334a51b58ef83d6aceaf9d94d9d90480662ec3c1254c5be015fd3e646597334ef7969dc847bbfe39b4f3b161784
6
+ metadata.gz: 5172205785804e8b064e61667fec47c889a1e9dc86a5309b6b4030c71b6c7226b2c02ea06fa3376eba8b5439e4c83f4615f29a338e2c9a171e216922ae7002fd
7
+ data.tar.gz: e456fbf641474294ba47bfb3c07af523801c717902d6415f31fb5720833e4c19106e6433f0c4a2718ab111080f2de1c6c249638be2347c6644b58401cf7175c7
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hcl-checker (1.0.5)
4
+ hcl-checker (1.0.6)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -31,8 +31,8 @@ rule
31
31
  #-------------------------------------------------------------------------------
32
32
  {MCOMMENTIN} { consume_comment(text) }
33
33
  {BOOL} { [:BOOL, to_boolean(text)]}
34
- {NUMBER} { [:NUMBER, text.to_i] }
35
34
  {FLOAT} { [:FLOAT, text.to_f] }
35
+ {NUMBER} { [:NUMBER, text.to_i] }
36
36
  {QUOTE} { [:STRING, consume_string(text)] }
37
37
  {HEREDOCUMENT} { [:STRING, consume_heredoc] }
38
38
  #-------------------------------------------------------------------------------
@@ -95,7 +95,7 @@ inner
95
95
  when %r{\$\{\z}
96
96
  nested += 1
97
97
  when %r{\}\z}
98
- nested -= 1
98
+ nested -= 1 if nested > 0
99
99
  when %r{\\\z}
100
100
  result += text.chop + @ss.getch
101
101
  next
@@ -1,5 +1,5 @@
1
1
  module HCL
2
2
  module Checker
3
- VERSION = '1.0.5'
3
+ VERSION = '1.0.6'
4
4
  end
5
5
  end
@@ -72,12 +72,12 @@ class HCLLexer
72
72
  when (text = @ss.scan(/true|false/))
73
73
  action { [:BOOL, to_boolean(text)]}
74
74
 
75
- when (text = @ss.scan(/-?\d+/))
76
- action { [:NUMBER, text.to_i] }
77
-
78
75
  when (text = @ss.scan(/\-?\d+\.\d+/))
79
76
  action { [:FLOAT, text.to_f] }
80
77
 
78
+ when (text = @ss.scan(/-?\d+/))
79
+ action { [:NUMBER, text.to_i] }
80
+
81
81
  when (text = @ss.scan(/\"/))
82
82
  action { [:STRING, consume_string(text)] }
83
83
 
@@ -157,7 +157,7 @@ class HCLLexer
157
157
  when %r{\$\{\z}
158
158
  nested += 1
159
159
  when %r{\}\z}
160
- nested -= 1
160
+ nested -= 1 if nested > 0
161
161
  when %r{\\\z}
162
162
  result += text.chop + @ss.getch
163
163
  next
@@ -70,19 +70,19 @@ module_eval(<<'...end parse.y/module_eval...', 'parse.y', 115)
70
70
 
71
71
  racc_action_table = [
72
72
  20, 26, 25, 36, 26, 25, 5, 21, 6, 13,
73
- 33, 24, 35, 26, 25, 30, 5, 10, 6, 33,
74
- 5, 28, 6, -8, 16, 34, 17, 5, 13, 6,
75
- -9, 12, 18 ]
73
+ 33, 24, 35, 26, 25, 30, 5, 18, 6, 33,
74
+ 5, 28, 6, 12, 16, 34, 17, 5, 13, 6,
75
+ -9, -8, 10 ]
76
76
 
77
77
  racc_action_check = [
78
78
  12, 12, 12, 29, 24, 24, 0, 12, 0, 12,
79
- 24, 12, 29, 36, 36, 24, 13, 1, 13, 36,
80
- 27, 13, 27, 5, 9, 27, 9, 3, 9, 3,
81
- 6, 7, 10 ]
79
+ 24, 12, 29, 36, 36, 24, 13, 10, 13, 36,
80
+ 27, 13, 27, 7, 9, 27, 9, 3, 9, 3,
81
+ 6, 5, 1 ]
82
82
 
83
83
  racc_action_pointer = [
84
- -1, 17, nil, 20, nil, 15, 22, 23, nil, 17,
85
- 32, nil, -2, 9, nil, nil, nil, nil, nil, nil,
84
+ -1, 32, nil, 20, nil, 23, 22, 15, nil, 17,
85
+ 17, nil, -2, 9, nil, nil, nil, nil, nil, nil,
86
86
  nil, nil, nil, nil, 1, nil, nil, 13, nil, -2,
87
87
  nil, nil, nil, nil, nil, nil, 10, nil ]
88
88
 
@@ -93,18 +93,18 @@ racc_action_default = [
93
93
  -21, -22, -25, -26, -6, -20, -24, -23 ]
94
94
 
95
95
  racc_goto_table = [
96
- 11, 3, 14, 31, 1, 22, 2, 19, 23, 15,
97
- 29, nil, nil, nil, 27, 37, nil, nil, nil, nil,
96
+ 11, 3, 14, 31, 15, 22, 29, 19, 2, 1,
97
+ 23, nil, nil, nil, 27, 37, nil, nil, nil, nil,
98
98
  nil, nil, nil, nil, 11 ]
99
99
 
100
100
  racc_goto_check = [
101
- 4, 3, 5, 12, 1, 5, 2, 7, 8, 9,
102
- 11, nil, nil, nil, 3, 12, nil, nil, nil, nil,
101
+ 4, 3, 5, 12, 9, 5, 11, 7, 2, 1,
102
+ 8, nil, nil, nil, 3, 12, nil, nil, nil, nil,
103
103
  nil, nil, nil, nil, 4 ]
104
104
 
105
105
  racc_goto_pointer = [
106
- nil, 4, 6, 1, -3, -7, nil, -5, -4, 0,
107
- nil, -14, -21 ]
106
+ nil, 9, 8, 1, -3, -7, nil, -5, -2, -5,
107
+ nil, -18, -21 ]
108
108
 
109
109
  racc_goto_default = [
110
110
  nil, nil, nil, nil, 4, nil, 7, 32, nil, 8,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hcl-checker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Castellani
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-02-27 00:00:00.000000000 Z
11
+ date: 2018-04-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler