hcl-checker 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/assets/lexer.rex +2 -2
- data/lib/hcl/checker/version.rb +1 -1
- data/lib/hcl/lexer.rb +4 -4
- data/lib/hcl/parser.rb +14 -14
- 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: d1efd195e8ca8b8db483856773b83144bc9137c2
|
4
|
+
data.tar.gz: e2bf9f4f3c1ea37361e5df981316b7849bf74c5e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5172205785804e8b064e61667fec47c889a1e9dc86a5309b6b4030c71b6c7226b2c02ea06fa3376eba8b5439e4c83f4615f29a338e2c9a171e216922ae7002fd
|
7
|
+
data.tar.gz: e456fbf641474294ba47bfb3c07af523801c717902d6415f31fb5720833e4c19106e6433f0c4a2718ab111080f2de1c6c249638be2347c6644b58401cf7175c7
|
data/Gemfile.lock
CHANGED
data/assets/lexer.rex
CHANGED
@@ -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
|
data/lib/hcl/checker/version.rb
CHANGED
data/lib/hcl/lexer.rb
CHANGED
@@ -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
|
data/lib/hcl/parser.rb
CHANGED
@@ -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,
|
74
|
-
5, 28, 6,
|
75
|
-
-9,
|
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,
|
80
|
-
27, 13, 27,
|
81
|
-
6,
|
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,
|
85
|
-
|
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,
|
97
|
-
|
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,
|
102
|
-
|
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,
|
107
|
-
nil, -
|
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.
|
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-
|
11
|
+
date: 2018-04-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|