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:
parent
4d1e0c96a4
commit
64aa779315
|
@ -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)))
|
||||
|
|
Loading…
Reference in New Issue