mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-21 14:49:18 +02:00
adding #! as a line-comment to support unix scripts
This commit is contained in:
parent
3ecea4d666
commit
636e9d75c0
1 changed files with 6 additions and 0 deletions
6
sexp.c
6
sexp.c
|
@ -1318,6 +1318,12 @@ sexp sexp_read_raw (sexp ctx, sexp in) {
|
||||||
else
|
else
|
||||||
goto scan_loop;
|
goto scan_loop;
|
||||||
break;
|
break;
|
||||||
|
case '!':
|
||||||
|
while ((c1 = sexp_read_char(ctx, in)) != EOF)
|
||||||
|
if (c1 == '\n')
|
||||||
|
break;
|
||||||
|
sexp_port_line(in)++;
|
||||||
|
goto scan_loop;
|
||||||
case '\\':
|
case '\\':
|
||||||
c1 = sexp_read_char(ctx, in);
|
c1 = sexp_read_char(ctx, in);
|
||||||
res = sexp_read_symbol(ctx, in, c1, 0);
|
res = sexp_read_symbol(ctx, in, c1, 0);
|
||||||
|
|
Loading…
Add table
Reference in a new issue