ascode 0.3.0 → 0.3.1
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/ascode/parser.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a84ef30c0d5d4a4e9cf006e4dfeb586679d7537b73427f15ed224e439f6d1d68
|
|
4
|
+
data.tar.gz: 4bb125bb43ca2101f16b82dc1f20fcc8593b1ed22f35b990f42b235fd789f69f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 981a7a17e6d78e2d3338c61776a773e87abfd895272312bad806806a9a675b01b91d2ea0242814f30f0d9f2caa3897743c6bd1ad6ae2fb78be8d7d47b9fc6e0f
|
|
7
|
+
data.tar.gz: 6ae9e6aa11e741780b319e453e59f061bfcd947de699a3a8efed42573a850b0cad260e8baef74dc2064381104fb5b36bc5bcc0d37ca396c4c5077ff097c64b63
|
data/lib/ascode/parser.rb
CHANGED
|
@@ -43,7 +43,10 @@ module Ascode
|
|
|
43
43
|
|
|
44
44
|
if split_pos == -1
|
|
45
45
|
true_block_ast = (Parser.new block_code).parse
|
|
46
|
-
false_block_ast =
|
|
46
|
+
false_block_ast = []
|
|
47
|
+
elsif split_pos.zero?
|
|
48
|
+
true_block_ast = []
|
|
49
|
+
false_block_ast = (Parser.new block_code[1..-1]).parse
|
|
47
50
|
else
|
|
48
51
|
true_block_ast = (Parser.new block_code[0..(split_pos - 1)], false).parse
|
|
49
52
|
false_block_ast = (Parser.new block_code[(split_pos + 1)..-1], false).parse
|