diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-27 15:34:03 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-10-27 15:34:03 +0000 |
commit | 084854ad0139418a939dfc42e869d562c6212068 (patch) | |
tree | b31178235f8e3e0e7631ef28a69d64783eefd658 /gcc/melt/warmelt-macro.melt | |
parent | 05db424bdb6e0ebcddde0524d66cf55a2e258b7b (diff) | |
download | gcc-084854ad0139418a939dfc42e869d562c6212068.tar.gz |
2014-10-27 Basile Starynkevitch <basile@starynkevitch.net>
* melt/warmelt-macro.melt (mexpand_let): For :macro bindings, stop
the expansion on error before and after
melt_delayed_macro_expander.
* testsuite/melt/t-treecode.melt: Simplified, but still don't work.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@216740 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/melt/warmelt-macro.melt')
-rw-r--r-- | gcc/melt/warmelt-macro.melt | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/gcc/melt/warmelt-macro.melt b/gcc/melt/warmelt-macro.melt index c18e48976c9..fc76f9dd6b0 100644 --- a/gcc/melt/warmelt-macro.melt +++ b/gcc/melt/warmelt-macro.melt @@ -7185,15 +7185,25 @@ applications of @code{/i} primitives.}# "\n.. mexpanderm=" debug_less mexpanderm "\n.. macbind=" macbind) (shortbacktrace_dbg "mexpand_let:mexpanser" 25) + (when (>i (melt_error_counter) 0) + (debug "mexpand_let:mexpanser" " loc=" loc " errored") + (error_at loc "MELT will not expand LET :macro $1 with #$2 errors" + macsymb (melt_error_counter)) + (return ())) (debug "mexpand_let:mexpanser before melt_delayed_macro_expander" " maclist=" maclist "\n.. macbind=" macbind) (melt_delayed_macro_expander macbind maclist envm mexpanderm modctx) - (debug "mexpand_let:mexpanser after melt_delayed_macro_expander" + (debug "mexpand_let:mexpanser" " loc=" loc " after melt_delayed_macro_expander" " maclist=" maclist "\n.. macbind=" macbind) + (when (>i (melt_error_counter) 0) + (debug "mexpand_let:mexpanser" " loc=" loc " delayerrored") + (error_at loc "MELT will not expand LET :macro $1 with #$2 errors after delayed expansion" + macsymb (melt_error_counter)) + (return ())) (let ( (mclos (get_field :mbind_expanser macbind)) (locm (get_field :loca_location sexprm)) ) - (debug "mexpand_let:mexpanser" + (debug "mexpand_let:mexpanser" " afterdelay" " loc=" loc " locm=" locm "\n.. mclos=" mclos "\n.. mexpanser=" mexpanser @@ -7202,6 +7212,10 @@ applications of @code{/i} primitives.}# (error_at locm "failed to macro-expand LET :macro $1" macsymb) (warning_at loc "failed to expand LET :macro $1 defined here" macsymb) (return)) + (debug "mexpand_let:mexpanser" + " beforemulticall" + " loc=" loc " locm=" locm + " mclos=" mclos " sexprm=" sexprm) (multicall (expmac othermac) (mclos sexprm envm mexpanderm modctxm) |