Compare commits
3 commits
a94c6f4e8f
...
fea2a85b54
Author | SHA1 | Date | |
---|---|---|---|
fea2a85b54 | |||
1b2b65cd41 | |||
08ea79f2de |
3 changed files with 8 additions and 6 deletions
|
@ -8,7 +8,9 @@
|
|||
:finally (return start))))
|
||||
(subseq string
|
||||
start
|
||||
(position #\Newline string :start (1+ start)))))
|
||||
(if (< start (length string))
|
||||
(position #\Newline string :start (1+ start))
|
||||
nil))))
|
||||
|
||||
(defun point-out-source (source)
|
||||
(if (null source)
|
||||
|
|
|
@ -11,4 +11,4 @@
|
|||
(:export #:usc-init #:compile-string-to-bytes
|
||||
;; Errors
|
||||
#:usc-error #:tokenizer-error #:missing-function-error
|
||||
#:parser-error))
|
||||
#:parser-error #:source))
|
||||
|
|
|
@ -164,13 +164,13 @@ reading immediately. Should be a subset of *SPECIAL-TOKEN-CHARS*.")
|
|||
(next-token))
|
||||
;; Process and add a newline
|
||||
((char= char #\Newline)
|
||||
(setf in-comment-p nil
|
||||
line (1+ line)
|
||||
column 0)
|
||||
(unless (zerop (length token-text-buffer))
|
||||
(next-token))
|
||||
(vector-push #\Newline token-text-buffer)
|
||||
(next-token))
|
||||
(next-token)
|
||||
(setf in-comment-p nil
|
||||
line (1+ line)
|
||||
column 0))
|
||||
;; Starting a comment
|
||||
((and (member char *line-comment-chars* :test #'char=) (not in-comment-p))
|
||||
(unless (zerop (length token-text-buffer))
|
||||
|
|
Loading…
Add table
Reference in a new issue