DEFINE: Properly support redefining a macro.
authorBen Pfaff <blp@cs.stanford.edu>
Thu, 2 Sep 2021 16:23:11 +0000 (09:23 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Thu, 2 Sep 2021 16:26:45 +0000 (09:26 -0700)
commitbb7605897eddfc1a416aa5cb2b6a3de13ee624de
treee28fc05cca94fd2e922748385d9b209c3ccc8902
parent340f224bd085965d5ff724afdafa04759f8a040f
DEFINE: Properly support redefining a macro.

Redefining a macro didn't work in simple cases because the macro name was
being expanded in the DEFINE command.

Thanks to Frans Houweling for reporting the bug.
src/language/control/define.c
src/language/lexer/scan.c
src/language/lexer/segment.c
src/language/lexer/segment.h
tests/language/control/define.at
tests/language/lexer/scan.at
tests/language/lexer/segment.at