mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-07-15 08:57:33 +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
13
sexp.c
13
sexp.c
|
@ -1902,10 +1902,23 @@ sexp sexp_read_raw (sexp ctx, sexp in) {
|
||||||
goto scan_loop;
|
goto scan_loop;
|
||||||
break;
|
break;
|
||||||
case '!':
|
case '!':
|
||||||
|
#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)
|
while ((c1 = sexp_read_char(ctx, in)) != EOF)
|
||||||
if (c1 == '\n')
|
if (c1 == '\n')
|
||||||
break;
|
break;
|
||||||
sexp_port_line(in)++;
|
sexp_port_line(in)++;
|
||||||
|
#if SEXP_USE_FOLD_CASE_SYMS
|
||||||
|
}
|
||||||
|
#endif
|
||||||
goto scan_loop;
|
goto scan_loop;
|
||||||
case '\\':
|
case '\\':
|
||||||
c1 = sexp_read_char(ctx, in);
|
c1 = sexp_read_char(ctx, in);
|
||||||
|
|
Loading…
Add table
Reference in a new issue