diff options
author | Eduardo Julian | 2014-11-29 00:03:32 -0400 |
---|---|---|
committer | Eduardo Julian | 2014-11-29 00:03:32 -0400 |
commit | 71b63cbbb858b85dd4850c4aa174cf7ec509b11c (patch) | |
tree | b1c462586b850a83f8dcd529e8216613b45c8ab7 /src/lang/parser.clj | |
parent | 1570e819a875ac0e7f80857f0793784984db687d (diff) |
+ Added floats.
+ Added def for constants.
Diffstat (limited to '')
-rw-r--r-- | src/lang/parser.clj | 5 |
1 files changed, 5 insertions, 0 deletions
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 |