lexer: Do not let comments delimit words.

The '#' character only introduces a comment if it occurs where a word
would begin.  If it occurs within a word, it is not treated specially.

* geesh/lexer.scm (get-word): Do not treat '#' specially.
This commit is contained in:
Timothy Sample 2018-12-21 20:43:16 -05:00
parent 4d1e0c96a4
commit 64aa779315
1 changed files with 2 additions and 3 deletions

View File

@ -425,7 +425,7 @@ next character statisfies @var{pred} (or is a newline)."
((or (? eof-object?)
(? operator-prefix-char?)
(? blank?)
#\newline #\#
#\newline
#\$ #\` #\' #\" #\\) (list->string (reverse! acc)))
(_ (loop (next-char port) (cons chr acc))))))
@ -448,8 +448,7 @@ next character statisfies @var{pred} (or is a newline)."
((or (? eof-object?)
(? operator-prefix-char?)
(? blank?)
#\newline
#\#) (acc->token acc chr))
#\newline) (acc->token acc chr))
((or #\$ #\`)
(if (expansions?)
(let ((expansion (get-expansion port)))