template-ruby-parser 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/code/parser/operation.rb +12 -10
- data/lib/template/parser.rb +1 -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: 3652d9bb92099379a929df14b999cd8508f3be60c5ceb884f062453c921e7b09
|
4
|
+
data.tar.gz: 744449bccfc4e058222b17d27d1402f134012dfb87c2a66239c82ee7802c0003
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffbfc9e64b65b7bb9ba68917ca9340a9904b25b871ef0630bf9d4cd4a87189bd0b34889b1fbea7231c50ba2726a15ebd524d7886a2655acdd0f71bf815fb297c
|
7
|
+
data.tar.gz: 8a1e76fd57dfad95201f0259b962bdfea907fac4f92704e6af2dc9eee3450d1d0cea35ba55cc348762b91d606152a6fbd1cb30249b31f7993abb5d46eab6aa24
|
data/CHANGELOG.md
CHANGED
@@ -19,15 +19,20 @@ class Code
|
|
19
19
|
while operator = match(operators)
|
20
20
|
comments_before = parse_comments
|
21
21
|
statement = parse_subclass(subclass)
|
22
|
-
previous_cursor = cursor
|
23
22
|
comments_after = parse_comments
|
24
23
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
24
|
+
if statement
|
25
|
+
right << {
|
26
|
+
statement: statement,
|
27
|
+
operator: operator,
|
28
|
+
comments_before: comments_before,
|
29
|
+
comments_after: comments_after
|
30
|
+
}.compact
|
31
|
+
else
|
32
|
+
@cursor = previous_cursor
|
33
|
+
buffer!
|
34
|
+
break
|
35
|
+
end
|
31
36
|
end
|
32
37
|
|
33
38
|
if right.empty?
|
@@ -35,9 +40,6 @@ class Code
|
|
35
40
|
buffer!
|
36
41
|
left
|
37
42
|
else
|
38
|
-
@cursor = previous_cursor
|
39
|
-
buffer!
|
40
|
-
|
41
43
|
right[-1].delete(:comments_after)
|
42
44
|
|
43
45
|
{
|
data/lib/template/parser.rb
CHANGED