mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-07 05:06:37 +02:00
Fixing source info tracking in \<newline> string escapes and multi-lined comments.
This commit is contained in:
parent
99d9203362
commit
0686b03258
1 changed files with 6 additions and 1 deletions
7
sexp.c
7
sexp.c
|
@ -2161,7 +2161,10 @@ sexp sexp_read_string (sexp ctx, sexp in, int sentinel) {
|
|||
if (isspace(c)) {
|
||||
while (c==' ' || c=='\t') c=sexp_read_char(ctx, in);
|
||||
if (c=='\r') c=sexp_read_char(ctx, in);
|
||||
if (c=='\n') do {c=sexp_read_char(ctx, in);} while (c==' ' || c=='\t');
|
||||
if (c=='\n') {
|
||||
sexp_port_line(in)++;
|
||||
do {c=sexp_read_char(ctx, in);} while (c==' ' || c=='\t');
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -2822,6 +2825,8 @@ sexp sexp_read_raw (sexp ctx, sexp in) {
|
|||
while ((c1 = sexp_read_char(ctx, in)) == '|')
|
||||
;
|
||||
if (c1 == '#') c2--;
|
||||
} else if (c1 == '\n') {
|
||||
sexp_port_line(in)++;
|
||||
}
|
||||
}
|
||||
if (c1 == EOF)
|
||||
|
|
Loading…
Add table
Reference in a new issue