diff options
author | Andy Wingo <wingo@pobox.com> | 2010-01-15 22:24:31 +0100 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2010-01-15 22:31:23 +0100 |
commit | 5afa815c9cd4550bf93181bc0ed0134aa83dfc5d (patch) | |
tree | c5b5eef9dbf40ff943c31e748310633cbbbbc1ce /libguile/private-options.h | |
parent | e1138ba1995f970083ad752f1ff8f71876483194 (diff) | |
download | guile-5afa815c9cd4550bf93181bc0ed0134aa83dfc5d.tar.gz |
add reader option for parsing [] as ().
* libguile/private-options.h:
* libguile/read.c (scm_read_opts, SCM_SQUARE_BRACKETS_P): Add an option
for treating [ and ] as parentheses, on by default. Note that this
makes them delimiters also, so [ and ] cannot appear in a symbol name,
with this read option on.
(scm_read_sexp): If we start with [, we end with ].
(scm_read_expression): Add case for [.
Diffstat (limited to 'libguile/private-options.h')
-rw-r--r-- | libguile/private-options.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libguile/private-options.h b/libguile/private-options.h index 40d40fbd7..f027b72e6 100644 --- a/libguile/private-options.h +++ b/libguile/private-options.h @@ -4,7 +4,7 @@ * We put this in a private header, since layout of data structures * is an implementation detail that we want to hide. * - * Copyright (C) 2007, 2009 Free Software Foundation, Inc. + * Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License @@ -96,6 +96,7 @@ SCM_API scm_t_option scm_read_opts[]; #define SCM_ESCAPED_PARENS_P scm_read_opts[5].val #endif #define SCM_R6RS_ESCAPES_P scm_read_opts[6].val +#define SCM_SQUARE_BRACKETS_P scm_read_opts[7].val #if SCM_ENABLE_ELISP #define SCM_N_READ_OPTIONS 7 |