mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-19 02:37:34 +02:00
Fixing intraline whitespace parsing followed immediately by another escape.
Fixes issue #343.
This commit is contained in:
parent
28148e52b7
commit
0a0db861ed
2 changed files with 9 additions and 0 deletions
|
@ -85,6 +85,13 @@
|
||||||
(test 15.0 (read-from-string "#i#xf"))
|
(test 15.0 (read-from-string "#i#xf"))
|
||||||
(test (expt 10 100) (read-from-string "#e1e100"))
|
(test (expt 10 100) (read-from-string "#e1e100"))
|
||||||
|
|
||||||
|
(test "A\n\nB\n" (read-from-string "\"A\\n\\
|
||||||
|
\\n\\
|
||||||
|
B\n\""))
|
||||||
|
(test "A\n\n" (read-from-string "\"A\\n\\
|
||||||
|
\\n\\
|
||||||
|
\""))
|
||||||
|
|
||||||
(cond-expand
|
(cond-expand
|
||||||
(chicken
|
(chicken
|
||||||
(test-io "(#0=\"abc\" #0# #0#)"
|
(test-io "(#0=\"abc\" #0# #0#)"
|
||||||
|
|
2
sexp.c
2
sexp.c
|
@ -2207,6 +2207,8 @@ sexp sexp_read_string (sexp ctx, sexp in, int sentinel) {
|
||||||
if (c=='\n') {
|
if (c=='\n') {
|
||||||
sexp_port_line(in)++;
|
sexp_port_line(in)++;
|
||||||
do {c=sexp_read_char(ctx, in);} while (c==' ' || c=='\t');
|
do {c=sexp_read_char(ctx, in);} while (c==' ' || c=='\t');
|
||||||
|
sexp_push_char(ctx, c, in);
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Reference in a new issue