segment: Improve segmentation when DEFINE command has early terminator.
authorBen Pfaff <blp@cs.stanford.edu>
Tue, 13 Apr 2021 16:58:46 +0000 (09:58 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Tue, 13 Apr 2021 17:00:19 +0000 (10:00 -0700)
commit6467d294ac5750d7ee060f5c4e0291275ece238d
tree02967f4ff0b98d0908210a8fa134c13bcf6f3c4e
parent29750abbb77e892f937b6551984df1952b4163a1
segment: Improve segmentation when DEFINE command has early terminator.

The DEFINE command should not have a command terminator before the final
!ENDDEFINE.  When it does, that ends the whole thing early.  The segmenter
didn't handle this well, instead treating everything up to !ENDDEFINE as
part of the command.  That's probably not the best way because it makes
for confusing error messages.  This improves the behavior.
src/language/lexer/segment.c
tests/language/lexer/scan.at
tests/language/lexer/segment.at