bindy 0.0.3 → 0.0.4
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/.travis.yml +4 -1
- data/lib/bindy/language.rb +32 -2
- data/lib/bindy/language.treetop +5 -1
- data/lib/bindy/language_interpreters.rb +6 -0
- data/lib/bindy/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: af9b60c22dd2e77d0eb7e1f88ecf7d6a2fa15c3f
|
4
|
+
data.tar.gz: 05380aed76274aedfca2f5980976de0f710d627b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e66b3265231ff1c30d8db200fab24059431b29c400e6a231b7401dd03d020e1ace33eca8fbaafe27a7dc4afbbec486a6b136fc86c3ac79662655d5ddd00d73b4
|
7
|
+
data.tar.gz: 2e188931eab3cab13250541c6906c075176bb91435a93877101272d452509080a7b2461d9a80e434b2546dac4456992831e00db85179e4ef4195933bacf5586a
|
data/.travis.yml
CHANGED
data/lib/bindy/language.rb
CHANGED
@@ -313,8 +313,14 @@ module Bindy
|
|
313
313
|
r3 = SyntaxNode.new(input, (index-1)...index) if r3 == true
|
314
314
|
r0 = r3
|
315
315
|
else
|
316
|
-
|
317
|
-
|
316
|
+
r4 = _nt_null
|
317
|
+
if r4
|
318
|
+
r4 = SyntaxNode.new(input, (index-1)...index) if r4 == true
|
319
|
+
r0 = r4
|
320
|
+
else
|
321
|
+
@index = i0
|
322
|
+
r0 = nil
|
323
|
+
end
|
318
324
|
end
|
319
325
|
end
|
320
326
|
end
|
@@ -669,6 +675,30 @@ module Bindy
|
|
669
675
|
r0
|
670
676
|
end
|
671
677
|
|
678
|
+
def _nt_null
|
679
|
+
start_index = index
|
680
|
+
if node_cache[:null].has_key?(index)
|
681
|
+
cached = node_cache[:null][index]
|
682
|
+
if cached
|
683
|
+
node_cache[:null][index] = cached = SyntaxNode.new(input, index...(index + 1)) if cached == true
|
684
|
+
@index = cached.interval.end
|
685
|
+
end
|
686
|
+
return cached
|
687
|
+
end
|
688
|
+
|
689
|
+
if (match_len = has_terminal?('null', false, index))
|
690
|
+
r0 = instantiate_node(LiteralNull,input, index...(index + match_len))
|
691
|
+
@index += match_len
|
692
|
+
else
|
693
|
+
terminal_parse_failure('\'null\'')
|
694
|
+
r0 = nil
|
695
|
+
end
|
696
|
+
|
697
|
+
node_cache[:null][start_index] = r0
|
698
|
+
|
699
|
+
r0
|
700
|
+
end
|
701
|
+
|
672
702
|
def _nt_space
|
673
703
|
start_index = index
|
674
704
|
if node_cache[:space].has_key?(index)
|
data/lib/bindy/language.treetop
CHANGED
@@ -20,7 +20,7 @@ module Bindy
|
|
20
20
|
end
|
21
21
|
|
22
22
|
rule value
|
23
|
-
number / boolean / string
|
23
|
+
number / boolean / string / null
|
24
24
|
end
|
25
25
|
|
26
26
|
rule string
|
@@ -51,6 +51,10 @@ module Bindy
|
|
51
51
|
'false' <LiteralFalse>
|
52
52
|
end
|
53
53
|
|
54
|
+
rule null
|
55
|
+
'null' <LiteralNull>
|
56
|
+
end
|
57
|
+
|
54
58
|
rule space
|
55
59
|
[\s\t\n]
|
56
60
|
end
|
data/lib/bindy/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bindy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gabriel Naiman
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: treetop
|
@@ -152,7 +152,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
152
152
|
version: '0'
|
153
153
|
requirements: []
|
154
154
|
rubyforge_project:
|
155
|
-
rubygems_version: 2.4.
|
155
|
+
rubygems_version: 2.4.8
|
156
156
|
signing_key:
|
157
157
|
specification_version: 4
|
158
158
|
summary: Context binding for functions evaluation
|