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))))
|
:finally (return start))))
|
||||||
(subseq string
|
(subseq string
|
||||||
start
|
start
|
||||||
(position #\Newline string :start (1+ start)))))
|
(if (< start (length string))
|
||||||
|
(position #\Newline string :start (1+ start))
|
||||||
|
nil))))
|
||||||
|
|
||||||
(defun point-out-source (source)
|
(defun point-out-source (source)
|
||||||
(if (null source)
|
(if (null source)
|
||||||
|
|
|
@ -11,4 +11,4 @@
|
||||||
(:export #:usc-init #:compile-string-to-bytes
|
(:export #:usc-init #:compile-string-to-bytes
|
||||||
;; Errors
|
;; Errors
|
||||||
#:usc-error #:tokenizer-error #:missing-function-error
|
#: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))
|
(next-token))
|
||||||
;; Process and add a newline
|
;; Process and add a newline
|
||||||
((char= char #\Newline)
|
((char= char #\Newline)
|
||||||
(setf in-comment-p nil
|
|
||||||
line (1+ line)
|
|
||||||
column 0)
|
|
||||||
(unless (zerop (length token-text-buffer))
|
(unless (zerop (length token-text-buffer))
|
||||||
(next-token))
|
(next-token))
|
||||||
(vector-push #\Newline token-text-buffer)
|
(vector-push #\Newline token-text-buffer)
|
||||||
(next-token))
|
(next-token)
|
||||||
|
(setf in-comment-p nil
|
||||||
|
line (1+ line)
|
||||||
|
column 0))
|
||||||
;; Starting a comment
|
;; Starting a comment
|
||||||
((and (member char *line-comment-chars* :test #'char=) (not in-comment-p))
|
((and (member char *line-comment-chars* :test #'char=) (not in-comment-p))
|
||||||
(unless (zerop (length token-text-buffer))
|
(unless (zerop (length token-text-buffer))
|
||||||
|
|
Loading…
Add table
Reference in a new issue