lexer: Keep entire source file in memory.
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 22 Nov 2021 19:45:48 +0000 (11:45 -0800)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 22 Nov 2021 20:23:47 +0000 (12:23 -0800)
commit76eb15c0d5269965f505b87ca07b55b4a7ddbe41
tree1047306714ab6868ba03775df08107e941d05ece
parent364db2e2b6036a083eb34eff5167a8dd5074c773
lexer: Keep entire source file in memory.

Previously, the lexer tried to keep only part of each source file in
memory, the part that wasn't fully parsed yet.  With this commit, the
lexer holds the entire file in memory, even parts that are no longer
needed.  This should make it easier to produce better error messages.
src/language/lexer/lexer.c