From 3584641d4ed811de0cd23b21f500a5088be9075d Mon Sep 17 00:00:00 2001 From: Greg Sexton Date: Thu, 10 Apr 2014 20:25:30 +0100 Subject: [PATCH] Add conj --- origami.el | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/origami.el b/origami.el index 3e1c645..f710947 100644 --- a/origami.el +++ b/origami.el @@ -227,6 +227,11 @@ used to nil out data. This mutates the node." (setq res (origami-run-parser p (cdr res)))) (reverse acc)))) +(defun origami-parser-conj (p1 p2) + (lambda (content) + (or (origami-run-parser p1 content) + (origami-run-parser p2 content)))) + (origami-run-parser (origami-parser-many (origami-parser-paired (origami-parser-char "{") (origami-parser-char "}")