mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-04-30 03:40:34 +02:00
guile-snarf: allow multiple init actions on one line
* libguile/guile-snarf.in (modern_snarf): Allow programs to specify multiple initialization actions on a single line. This makes it possible for C programs to define multiple subrs with a single macro invocation. * test-suite/standalone/test-guile-snarf: Enable more tests.
This commit is contained in:
parent
2dea6a4d33
commit
fd029c35de
2 changed files with 4 additions and 4 deletions
|
@ -51,7 +51,7 @@ modern_snarf () # writes stdout
|
|||
## empty file.
|
||||
echo "/* cpp arguments: $@ */" ;
|
||||
${cpp} -DSCM_MAGIC_SNARF_INITS -DSCM_MAGIC_SNARFER "$@" > ${temp} && cpp_ok_p=true
|
||||
grep "^ *\^ *\^" ${temp} | sed -e "s/ *\^ *\^//g" -e "s/\^ *: *\^/;/g"
|
||||
sed -ne "s/ *\^ *: *\^/\n/;s/[^\n]*\^ *\^ *\([^\n]*\)/\1;/;tx;d;:x;P;D" ${temp}
|
||||
}
|
||||
|
||||
## main
|
||||
|
|
|
@ -15,6 +15,6 @@ snarf_test ()
|
|||
|
||||
snarf_test "^^a^:^" "a;"
|
||||
snarf_test " ^ ^ b ^ : ^ " "b;"
|
||||
#snarf_test "c\n^^d^:^\ne" "d;"
|
||||
#snarf_test "f^^g^:^h" "g;"
|
||||
#snarf_test "^^i^:^j^^k^:^" "i;k;"
|
||||
snarf_test "c\n^^d^:^\ne" "d;"
|
||||
snarf_test "f^^g^:^h" "g;"
|
||||
snarf_test "^^i^:^j^^k^:^" "i;k;"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue