Added an example from fnparse to the problem-cases section.
This commit is contained in:
parent
9a22e77c96
commit
91a2c90f46
1 changed files with 17 additions and 0 deletions
|
@ -32,3 +32,20 @@
|
|||
"This is also a docstring via metadata. It should be on the left."}
|
||||
c
|
||||
"This is just a value. It should be on the right.")
|
||||
|
||||
;; From [fnparse](https://github.com/joshua-choi/fnparse)
|
||||
|
||||
; Define single-character indicator rules.
|
||||
; I use `clojure.template/do-template` to reduce repetition.
|
||||
(do-template [rule-name token]
|
||||
(h/defrule rule-name
|
||||
"Padded on the front with optional whitespace."
|
||||
(h/lit token))
|
||||
<escape-char-start> \\
|
||||
<str-delimiter> \"
|
||||
<value-separator> \,
|
||||
<name-separator> \:
|
||||
<array-start> \[
|
||||
<array-end> \]
|
||||
<object-start> \{
|
||||
<object-end> \})
|
Loading…
Reference in a new issue