mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-20 11:40:18 +02:00
* snarf.h, filter-doc-snarfage.c: more changes to cope with
space-happy C preprocessors.
This commit is contained in:
parent
47bcd6465f
commit
a88ff5b650
3 changed files with 21 additions and 7 deletions
|
@ -1,5 +1,8 @@
|
|||
2001-06-08 Michael Livshin <mlivshin@bigfoot.com>
|
||||
|
||||
* snarf.h, filter-doc-snarfage.c: more changes to cope with
|
||||
space-happy C preprocessors.
|
||||
|
||||
* filter-doc-snarfage.c, guile-snarf.in: try to cope with spaces
|
||||
inside cookies. thanks to Matthias Köppe!
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@ typedef enum state_t
|
|||
SKIP,
|
||||
SKIP_COOKIE,
|
||||
|
||||
MULTILINE_BEGINNING_OF_LINE,
|
||||
MULTILINE,
|
||||
|
||||
MULTILINE_COOKIE,
|
||||
|
@ -68,11 +69,19 @@ process ()
|
|||
fputs ("(doc-block (\n", stdout);
|
||||
state = MULTILINE;
|
||||
break;
|
||||
case ' ':
|
||||
break;
|
||||
default:
|
||||
die ("bad snarf cookie");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case MULTILINE_BEGINNING_OF_LINE:
|
||||
if (c != ' ') {
|
||||
state = MULTILINE;
|
||||
putc (c, stdout);
|
||||
}
|
||||
break;
|
||||
case MULTILINE:
|
||||
if (c == '^') {
|
||||
if (want_cookie) {
|
||||
|
@ -92,13 +101,15 @@ process ()
|
|||
case '(':
|
||||
state = STRINGS;
|
||||
break;
|
||||
case ' ':
|
||||
state = MULTILINE;
|
||||
case '%':
|
||||
state = MULTILINE_BEGINNING_OF_LINE;
|
||||
break;
|
||||
case '}':
|
||||
fputs ("))\n", stdout);
|
||||
state = SKIP;
|
||||
break;
|
||||
case ' ':
|
||||
break;
|
||||
default:
|
||||
die ("bad snarf cookie in multiline context");
|
||||
break;
|
||||
|
|
|
@ -86,11 +86,11 @@
|
|||
# define SCM_SNARF_INIT(X)
|
||||
# define SCM_SNARF_DOCS(TYPE, FNAME, ARGLIST, REQ, OPT, VAR, DOCSTRING) \
|
||||
^^{ \
|
||||
^^ fname . FNAME \
|
||||
^^ type . TYPE \
|
||||
^^ location __FILE__ . __LINE__ \
|
||||
^^ arglist . ARGLIST \
|
||||
^^ argsig REQ OPT VAR \
|
||||
^^%fname . FNAME \
|
||||
^^%type . TYPE \
|
||||
^^%location __FILE__ . __LINE__ \
|
||||
^^%arglist . ARGLIST \
|
||||
^^%argsig REQ OPT VAR \
|
||||
^^(DOCSTRING) \
|
||||
^^}
|
||||
# else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue