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/lexer.clj | |
parent | 1570e819a875ac0e7f80857f0793784984db687d (diff) |
+ Added floats.
+ Added def for constants.
Diffstat (limited to 'src/lang/lexer.clj')
-rw-r--r-- | src/lang/lexer.clj | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lang/lexer.clj b/src/lang/lexer.clj index a51330e09..927453aeb 100644 --- a/src/lang/lexer.clj +++ b/src/lang/lexer.clj @@ -50,6 +50,7 @@ (exec [token (lex-regex <regex>)] (return [<tag> token]))) + ^:private lex-float ::float #"^(0|[1-9][0-9]*)\.[0-9]+" ^:private lex-int ::int #"^(0|[1-9][0-9]*)" ^:private lex-ident ::ident +ident-re+) @@ -96,7 +97,8 @@ (def ^:private lex-form (exec [_ (try-m lex-white-space) - form (try-all-m [lex-int + form (try-all-m [lex-float + lex-int lex-ident lex-tag lex-list |