ditto_code 0.2.5 → 0.2.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 +4 -4
- data/lib/dittocode/parse.rb +4 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0987b9b84f58ba555e6872dbe7213b5426fa0341
|
4
|
+
data.tar.gz: cb09974765f86b9a1474b3dfdd61f3a404af31fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4e8ba5a32a01c3c562eab6a872786dd488c95a5dd5a20ca37c8c23ce5e3e5a327c72c1883b0f292b7490f9e0e99ee99284187ee2111b5e3c87d3dab288fd6ae
|
7
|
+
data.tar.gz: 928027d05c290c2d7bba7077391638fac36bac06a8c5b2a105465251a93ec5eb709a66183f8af007bd68703c9cb1bb6f6daaa4d9dd42c8182ffb05e07c13387b
|
data/lib/dittocode/parse.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'pry'
|
2
|
+
|
1
3
|
module DittoCode
|
2
4
|
class Parse
|
3
5
|
|
@@ -235,7 +237,8 @@ module DittoCode
|
|
235
237
|
|
236
238
|
finals = line.scan(/[\s]+(end)[\s]*%>/).size
|
237
239
|
else
|
238
|
-
initializers = line.scan(/^[\s\t]*(case|unless|if|
|
240
|
+
initializers = line.scan(/^[\s\t]*(case|unless|if|def|do)[\s]+/).size
|
241
|
+
initializers += line.scan(/^[\s\t]*(begin)[\s]*/).size # If, def, unless... of a start line
|
239
242
|
initializers += line.scan(/[\s\t]+(case|do)[\s]+[|]+/).size # Case or do inside a line
|
240
243
|
initializers += line.scan(/[\s\t]+(do)[\s]*$/).size # Finals do
|
241
244
|
initializers += line.scan(/[\s\t]+(if|unless)[\s]+[@=\d\w\s]+(?:then){1}/).size # Only if|unless + then, this line disable error by: unless|if var
|