From 71b63cbbb858b85dd4850c4aa174cf7ec509b11c Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 29 Nov 2014 00:03:32 -0400 Subject: + Added floats. + Added def for constants. --- src/lang/parser.clj | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/lang/parser.clj') diff --git a/src/lang/parser.clj b/src/lang/parser.clj index 53f60941d..b3cb5cbc0 100644 --- a/src/lang/parser.clj +++ b/src/lang/parser.clj @@ -22,6 +22,10 @@ [::&lexer/int ?int] (return [::int (Long/parseLong ?int)])) +(defparser ^:private parse-float + [::&lexer/float ?float] + (return [::float (Double/parseDouble ?float)])) + (defparser ^:private parse-ident [::&lexer/ident ?ident] (return [::ident ?ident])) @@ -82,6 +86,7 @@ (def ^:private parse-form (try-all-m [parse-int + parse-float parse-ident parse-tuple parse-def -- cgit v1.2.3