diff options
author | Eduardo Julian | 2014-11-29 02:29:56 -0400 |
---|---|---|
committer | Eduardo Julian | 2014-11-29 02:29:56 -0400 |
commit | 74f1d02a2f16da9e2ce2fb747dad07979a9db26a (patch) | |
tree | d710b3178c804a4fe5d4f8cad0903fc787e60710 /src/lang/lexer.clj | |
parent | 71b63cbbb858b85dd4850c4aa174cf7ec509b11c (diff) |
+ Added simple let expressions. (No destructuring of tuples/records yet)
+ Added records and simple operations on them (get, set & remove).
Diffstat (limited to '')
-rw-r--r-- | src/lang/lexer.clj | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lang/lexer.clj b/src/lang/lexer.clj index 927453aeb..5bd57f7de 100644 --- a/src/lang/lexer.clj +++ b/src/lang/lexer.clj @@ -43,6 +43,12 @@ _ (lex-str "]")] (return [::tuple members]))) +(def ^:private lex-record + (exec [_ (lex-str "{") + members lex-forms + _ (lex-str "}")] + (return [::record members]))) + (def +ident-re+ #"^([a-zA-Z\-\+\_\=!@$%^&*<>\.,/\\\|'][a-zA-Z0-9\-\+\_\=!@$%^&*<>\.,/\\\|']*)") (do-template [<name> <tag> <regex>] @@ -103,6 +109,7 @@ lex-tag lex-list lex-tuple + lex-record lex-single-line-comment lex-multi-line-comment]) _ (try-m lex-white-space)] |