calyx 0.11.2 → 0.11.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -5
- data/lib/calyx/grammar.rb +1 -1
- data/lib/calyx/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b5a355ab937e5afbf5ab76be107bee0f4e0b53a9
|
4
|
+
data.tar.gz: be8ab43657f9a57fac3644fcb11a7f4c184433aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 30858f8a309bf24795679caaae1f43558e5c4ecc8e356747c35745ecf6a680b18127183814f4cd0b0b8c4c96a6e8ba151b14fec506f56e806f184e037d98c5cc
|
7
|
+
data.tar.gz: 166bcc17f2e120a8e0cc6b2b95f42696e032c51bcbdfc73d86d0645feefc403a442ddd50f34972f6c1ac3d7a622bb33073e42bf11b2aa0bd52024f169910c707
|
data/README.md
CHANGED
@@ -384,8 +384,6 @@ greeting = AppGreeting.new
|
|
384
384
|
greeting.generate(context)
|
385
385
|
```
|
386
386
|
|
387
|
-
__Note: The API may morph and change a bit as we try to figure out the best patterns for merging and combining grammars.__
|
388
|
-
|
389
387
|
### Accessing the Raw Generated Tree
|
390
388
|
|
391
389
|
Calling `#evaluate` on the grammar instance will give you access to the raw generated tree structure before it gets flattened into a string.
|
@@ -403,8 +401,6 @@ grammar.evaluate
|
|
403
401
|
# => [:start, [:choice, [:concat, [[:atom, "Riddle me ree."]]]]]
|
404
402
|
```
|
405
403
|
|
406
|
-
__Note: This feature is still experimental. The tree structure is likely to change so it’s probably best not to rely on it for anything big at this stage.__
|
407
|
-
|
408
404
|
## Roadmap
|
409
405
|
|
410
406
|
Rough plan for stabilising the API and features for a `1.0` release.
|
@@ -417,7 +413,6 @@ Rough plan for stabilising the API and features for a `1.0` release.
|
|
417
413
|
| `0.9` | ~~return grammar tree from `#evaluate`, with flattened string from `#generate` being separate~~ |
|
418
414
|
| `0.10` | ~~inject custom string functions for parameterised rules, transforms and mappings~~ |
|
419
415
|
| `0.11` | ~~support YAML format (and JSON?)~~ |
|
420
|
-
| `0.12` | indirection (allow output of a rule to be used as the name for another rule) |
|
421
416
|
| `1.0` | ~~API documentation~~ |
|
422
417
|
|
423
418
|
## Credits
|
data/lib/calyx/grammar.rb
CHANGED
@@ -49,7 +49,7 @@ module Calyx
|
|
49
49
|
# @param [Symbol] name
|
50
50
|
# @block block with a single string argument returning a modified string.
|
51
51
|
def filter(name, &block)
|
52
|
-
registry.
|
52
|
+
registry.filter(name, &block)
|
53
53
|
end
|
54
54
|
|
55
55
|
# DSL helper method for registering a new grammar rule.
|
data/lib/calyx/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: calyx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.11.
|
4
|
+
version: 0.11.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rickerby
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07
|
11
|
+
date: 2016-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|