mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-15 00:47:34 +02:00
adding #![no-]fold-case syntax
This commit is contained in:
parent
955fc708e9
commit
cf2adc79f5
1 changed files with 17 additions and 4 deletions
21
sexp.c
21
sexp.c
|
@ -1902,10 +1902,23 @@ sexp sexp_read_raw (sexp ctx, sexp in) {
|
|||
goto scan_loop;
|
||||
break;
|
||||
case '!':
|
||||
while ((c1 = sexp_read_char(ctx, in)) != EOF)
|
||||
if (c1 == '\n')
|
||||
break;
|
||||
sexp_port_line(in)++;
|
||||
#if SEXP_USE_FOLD_CASE_SYMS
|
||||
res = sexp_read_symbol(ctx, in, '!', 0);
|
||||
if (sexp_stringp(res)
|
||||
&& strcmp("!fold-case", sexp_string_data(res)) == 0) {
|
||||
sexp_port_fold_casep(in) = 1;
|
||||
} else if (sexp_stringp(res)
|
||||
&& strcmp("!no-fold-case", sexp_string_data(res)) == 0) {
|
||||
sexp_port_fold_casep(in) = 0;
|
||||
} else {
|
||||
#endif
|
||||
while ((c1 = sexp_read_char(ctx, in)) != EOF)
|
||||
if (c1 == '\n')
|
||||
break;
|
||||
sexp_port_line(in)++;
|
||||
#if SEXP_USE_FOLD_CASE_SYMS
|
||||
}
|
||||
#endif
|
||||
goto scan_loop;
|
||||
case '\\':
|
||||
c1 = sexp_read_char(ctx, in);
|
||||
|
|
Loading…
Add table
Reference in a new issue