From 382c19861608e9ab9903c78f1e5c02bc061cc7c8 Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Tue, 24 Dec 2024 00:05:11 +0530 Subject: Add driver changes and float regex --- src/cljcc/parser.clj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/cljcc/parser.clj') diff --git a/src/cljcc/parser.clj b/src/cljcc/parser.clj index 6ab3373..7837ce3 100644 --- a/src/cljcc/parser.clj +++ b/src/cljcc/parser.clj @@ -43,8 +43,8 @@ [kind [token & rst]] (if (= kind (:kind token)) [token rst] - (throw (ex-info "Parser Error." {:expected kind - :actual (:kind token)})))) + (exc/parser-error "Actual and expected token differ." {:expected kind + :actual (:kind token)}))) (defn constant-exp-node [v] {:type :exp @@ -519,7 +519,7 @@ (defn- parse-program [tokens] (let [[declarations tokens] (parse-repeatedly tokens parse-declaration :eof) _ (expect :eof tokens) - ;_ (m/coerce #'s/Program declarations) + ;_ (m/coerce #'s/Program declarations) ] declarations)) -- cgit v1.2.3