~subsetpark/ec

713e51f8e37ab8d4d419b1033d484b931ea9c9c7 — Zach Smith 7 months ago a95f128 allow-alternate-parens
Include curly braces as quotes
1 files changed, 2 insertions(+), 2 deletions(-)

M src/parser.janet
M src/parser.janet => src/parser.janet +2 -2
@@ 34,12 34,12 @@

(def- peg (peg/compile
            ~{:main (any (+ :s+ :quotes :vectors :token))
              :quotes (cmt (* "(" :main ")") ,handle-quotes)
              :quotes (cmt (* (set "({") :main (set ")}")) ,handle-quotes)
              :vectors (cmt (* "[" :main "]") ,handle-vectors)
              :number-part (some (+ :d "_"))
              :float (cmt (<- (* (? "-") :number-part "." :number-part)) ,handle-float)
              :int (cmt (<- (* (? "-") :number-part)) ,handle-int)
              :word (cmt (<- (some (if-not (+ :s (set "()[]")) 1))) ,handle-word)
              :word (cmt (<- (some (if-not (+ :s (set "()[]{}")) 1))) ,handle-word)
              :token (+ :float :int :word)}))

(defn parse