diff options
author | Eduardo Julian | 2015-01-03 11:46:20 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-01-03 11:46:20 -0400 |
commit | 8809c018b626132429a5673778db7093945037c3 (patch) | |
tree | 31381896335bcfc2e2b30a88b70e1368625d298d /src/lux/lexer.clj | |
parent | 661c70e4d786e7b2188564beddc586f1a50e4656 (diff) |
- Boolean is now Bool
- Integer is now Int
- Float is now Real
- String is now Text
Diffstat (limited to '')
-rw-r--r-- | src/lux/lexer.clj | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lux/lexer.clj b/src/lux/lexer.clj index a302e89ba..e058bf75f 100644 --- a/src/lux/lexer.clj +++ b/src/lux/lexer.clj @@ -59,10 +59,10 @@ (exec [token (lex-regex <regex>)] (return [<tag> token]))) - ^:private lex-boolean ::boolean #"^(true|false)" - ^: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+) + ^:private lex-bool ::bool #"^(true|false)" + ^:private lex-real ::real #"^(0|[1-9][0-9]*)\.[0-9]+" + ^:private lex-int ::int #"^(0|[1-9][0-9]*)" + ^:private lex-ident ::ident +ident-re+) (def ^:private lex-char (exec [_ (lex-str "#\"") @@ -72,7 +72,7 @@ _ (lex-str "\"")] (return [::char token]))) -(def ^:private lex-string +(def ^:private lex-text (exec [_ (lex-str "\"") ;; state &util/get-state ;; :let [_ (prn 'PRE state)] @@ -81,7 +81,7 @@ ;; state &util/get-state ;; :let [_ (prn 'POST state)] ] - (return [::string token]))) + (return [::text token]))) (def ^:private lex-single-line-comment (exec [_ (lex-str "##") @@ -118,11 +118,11 @@ (def ^:private lex-form (exec [_ (try-m lex-white-space) - form (try-all-m [lex-boolean - lex-float + form (try-all-m [lex-bool + lex-real lex-int lex-char - lex-string + lex-text lex-ident lex-tag lex-list |