diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2020-02-09 21:34:19 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2020-02-09 21:34:19 +0200 |
commit | ec041138efb27d105b391d022300a782552efdd2 (patch) | |
tree | f5702beb2fb8a724fe0f8f2116a5591463d90c4b | |
parent | d992f06bcbacb2c9432a19bb0d0641229aed6449 (diff) | |
download | egawk-ec041138efb27d105b391d022300a782552efdd2.tar.gz egawk-ec041138efb27d105b391d022300a782552efdd2.tar.bz2 egawk-ec041138efb27d105b391d022300a782552efdd2.zip |
All @eval to work again after a syntax error.
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | debug.c | 6 |
2 files changed, 9 insertions, 0 deletions
@@ -3,6 +3,9 @@ * awkgram.y: Add lint check for assignment in condition to if and for statements. Thanks to Jannick <thirdedition@gmx.net> for the suggestion. + * debug.c (do_eval): Remove @eval from the symbol table if there + was a syntax error in the statement being evaluated. Thanks again + to Jannick, for the report. 2020-02-01 Arnold D. Robbins <arnold@skeeve.com> @@ -5606,6 +5606,12 @@ do_eval(CMDARG *arg, int cmd ATTRIBUTE_UNUSED) if (ret != 0) { pop_context(); /* switch to prev context */ free_context(ctxt, false /* keep_globals */); + + /* Remove @eval from FUNCTAB. */ + NODE *s = make_string("@eval", 5); + (void) assoc_remove(func_table, s); + unref(s); + return false; } |