Added an example from fnparse to the problem-cases section.

This commit is contained in:
zkim 2010-12-23 16:55:40 -07:00
parent 9a22e77c96
commit 91a2c90f46

View file

@ -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> \})