truth_serum 0.1.1 → 0.1.2
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/truth_serum/lexer.rb +4 -1
- data/lib/truth_serum/parser.rb +5 -3
- data/lib/truth_serum/version.rb +1 -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: 4ef67ac7b09766e575e09a4e798dbd570032431a
|
4
|
+
data.tar.gz: dd3cb91aa96b3f411c05730ead221af4b986623f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f61f0fd66f34cc3bf12fe591b799b2f07a486f54c9b1590a3811790d8ffa3c4cee0c1ced6bf74c3dc2f7cbb7d41373dbf1e4505e0b002dd047513521656bb25
|
7
|
+
data.tar.gz: 8559f6a508ec74474df8f87af83e0abc6d1bd1b9a2280a5380af46d9109a851e012f684729eee24332244283a897c57dd8291e534835f029f79afe78a8e9b6f0
|
data/lib/truth_serum/lexer.rb
CHANGED
data/lib/truth_serum/parser.rb
CHANGED
@@ -51,10 +51,12 @@ module TruthSerum
|
|
51
51
|
term = consume.text
|
52
52
|
return emit_term(term, negate: negate) unless peek.colon?
|
53
53
|
|
54
|
-
#
|
55
|
-
consume
|
54
|
+
# initial `:` separator
|
55
|
+
consume
|
56
|
+
|
57
|
+
# the rest becomes value (including successive `:`s)
|
58
|
+
value += consume.text while peek.colon? || peek.term?
|
56
59
|
|
57
|
-
value = consume.text
|
58
60
|
emit_filter(term, value, negate: negate)
|
59
61
|
end
|
60
62
|
|
data/lib/truth_serum/version.rb
CHANGED