diff options
Diffstat (limited to 'src/cljcc/lexer.clj')
| -rw-r--r-- | src/cljcc/lexer.clj | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/cljcc/lexer.clj b/src/cljcc/lexer.clj index f1b0a2a..d092ea6 100644 --- a/src/cljcc/lexer.clj +++ b/src/cljcc/lexer.clj @@ -43,7 +43,7 @@ (-> ctx (update :col inc))) (digit? ch) (let [[chrs rst] (split-with letter-digit? source) - number (read-number (apply str chrs)) + number (read-number (apply str chrs) line col) cnt (count chrs) npos (+ pos cnt) token (t/create :number line col number)] @@ -67,14 +67,11 @@ (comment - (lex "int main(void) {return int a = 2; a <<= 2;}") - - - (lex " - extern int a; - - int main(void) { - return 42};") - + (lex + " +int main() { + long a = 110; +} +") ()) |
