mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-07 05:06:37 +02:00
fixing line-number info for multi-line strings
This commit is contained in:
parent
910c0e7fce
commit
505bd8d7e9
1 changed files with 4 additions and 3 deletions
7
sexp.c
7
sexp.c
|
@ -1545,8 +1545,9 @@ sexp sexp_read_string (sexp ctx, sexp in) {
|
|||
sexp_push_char(ctx, c, in); c = 'x';
|
||||
}
|
||||
}
|
||||
}
|
||||
if (c == EOF) {
|
||||
} else if (c == '\n') {
|
||||
sexp_port_line(in)++;
|
||||
} else if (c == EOF) {
|
||||
res = sexp_read_error(ctx, "premature end of string", SEXP_NULL, in);
|
||||
break;
|
||||
}
|
||||
|
@ -1579,7 +1580,7 @@ sexp sexp_read_symbol (sexp ctx, sexp in, int init, int internp) {
|
|||
if (init != EOF)
|
||||
buf[i++] = init;
|
||||
|
||||
for (c = sexp_read_char(ctx, in); c != '"'; c = sexp_read_char(ctx, in)) {
|
||||
for (c = sexp_read_char(ctx, in); ; c = sexp_read_char(ctx, in)) {
|
||||
#if SEXP_USE_FOLD_CASE_SYMS
|
||||
if (foldp) c = tolower(c);
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue