diff options
author | Eduardo Julian | 2015-11-29 12:59:44 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-11-29 12:59:44 -0400 |
commit | 09107d6abf85b51aa407880d0ed5dec7cfb22e85 (patch) | |
tree | 4b884172ef8eee03248df127d96d15f0259d11fd /src | |
parent | 5683946988997517dadb01fbf6ebefd85251962f (diff) |
- No longer removing empty lines from source code when reading it. Now lexing them as whitespace.
- Shifted version of the compiler to 0.3.1
Diffstat (limited to 'src')
-rw-r--r-- | src/lux/compiler/base.clj | 2 | ||||
-rw-r--r-- | src/lux/lexer.clj | 2 | ||||
-rw-r--r-- | src/lux/reader.clj | 3 |
3 files changed, 2 insertions, 5 deletions
diff --git a/src/lux/compiler/base.clj b/src/lux/compiler/base.clj index cf835a590..e677406a5 100644 --- a/src/lux/compiler/base.clj +++ b/src/lux/compiler/base.clj @@ -24,7 +24,7 @@ (java.lang.reflect Field))) ;; [Constants] -(def ^String version "0.4") +(def ^String version "0.3.1") (def ^String input-dir "source") (def ^String output-dir "target/jvm/") (def ^String output-package (str output-dir "program.jar")) diff --git a/src/lux/lexer.clj b/src/lux/lexer.clj index 651f9ecce..e82e22ee4 100644 --- a/src/lux/lexer.clj +++ b/src/lux/lexer.clj @@ -54,7 +54,7 @@ ;; [Lexers] (def ^:private lex-white-space - (|do [[meta white-space] (&reader/read-regex #"^(\s+)")] + (|do [[meta white-space] (&reader/read-regex #"^(\s+|$)")] (return (&/T meta (&/V $White_Space white-space))))) (def ^:private lex-single-line-comment diff --git a/src/lux/reader.clj b/src/lux/reader.clj index 751df7e6d..ce25527f3 100644 --- a/src/lux/reader.clj +++ b/src/lux/reader.clj @@ -130,9 +130,6 @@ (string/split-lines) (&/->list) (&/enumerate) - (&/|filter (fn [line+line-num] - (|let [[line-num line] line+line-num] - (not= "" line)))) (&/|map (fn [line+line-num] (|let [[line-num line] line+line-num] (&/T (&/T name (inc line-num) 0) |