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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fa0e427ab1d41b51af61ac220b267d00adb4f0f211205584d0db4a216d97d2dc
4
- data.tar.gz: b9ac2ad7ec6d595e2a7a81b0ff365739c5be29c35f8c41cfcb22f6f4db8ce7f5
3
+ metadata.gz: 3652d9bb92099379a929df14b999cd8508f3be60c5ceb884f062453c921e7b09
4
+ data.tar.gz: 744449bccfc4e058222b17d27d1402f134012dfb87c2a66239c82ee7802c0003
5
5
  SHA512:
6
- metadata.gz: e9b5023531a76db1fab33f19fee80b3d162de2155202fd136d9e56b5c496d6a18904d5ee99be919c192995adfd40ac5b461e11eb972c52af81ca4e832f30f3b0
7
- data.tar.gz: e5d2b91823eaa54a7ed3f05e01873306310b579c9fc4852969d9d2aa992d40f545ed637d7569bba4e8aa53d9420c7a5fe05e7a8b60d9cfbd47e8ea8bbd1d17ff
6
+ metadata.gz: ffbfc9e64b65b7bb9ba68917ca9340a9904b25b871ef0630bf9d4cd4a87189bd0b34889b1fbea7231c50ba2726a15ebd524d7886a2655acdd0f71bf815fb297c
7
+ data.tar.gz: 8a1e76fd57dfad95201f0259b962bdfea907fac4f92704e6af2dc9eee3450d1d0cea35ba55cc348762b91d606152a6fbd1cb30249b31f7993abb5d46eab6aa24
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ ### 0.1.4 - November 13, 2022
2
+
3
+ - Fix a || b
4
+
1
5
  ### 0.1.3 - November 13, 2022
2
6
 
3
7
  - Fix parsing &, *, **
@@ -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
- right << {
26
- statement: statement,
27
- operator: operator,
28
- comments_before: comments_before,
29
- comments_after: comments_after
30
- }.compact
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
  {
@@ -1,6 +1,6 @@
1
1
  class Template
2
2
  class Parser < ::Code::Parser
3
- Version = Gem::Version.new("0.1.3")
3
+ Version = Gem::Version.new("0.1.4")
4
4
 
5
5
  def parse
6
6
  parts = []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: template-ruby-parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dorian Marié