diff options
Diffstat (limited to '')
-rw-r--r-- | src/lang/parser.clj | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/lang/parser.clj b/src/lang/parser.clj index d1bd3dbd8..f09d87145 100644 --- a/src/lang/parser.clj +++ b/src/lang/parser.clj @@ -19,6 +19,10 @@ (fail* (str "Unmatched token: " token#)))))) ;; [Parsers] +(defparser ^:private parse-boolean + [::&lexer/boolean ?boolean] + (return [::boolean (Boolean/parseBoolean ?boolean)])) + (defparser ^:private parse-int [::&lexer/int ?int] (return [::int (Long/parseLong ?int)])) @@ -162,7 +166,8 @@ (return [::fn-call =f =args]))) (def ^:private parse-form - (try-all-m [parse-int + (try-all-m [parse-boolean + parse-int parse-float parse-string parse-ident |