18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-11-27 23:57:09 +01:00
Files
maszyna/tests/unit/test_parser.cpp
jerrrrycho ee14cefcb5 fix(parser): an include at the very end of a text leaves the end of the data to the included file (#492)
A file which ends right after the end of an include directive, with no line
break after it, had the parser report its end as soon as the directive was
read: eof() looked only at the text being read, not at the included file it
still had to go through. A reader which stops at the end of the data, like
deserialize_map() (the sound overrides), then read only the first line of the
included file. eof() now also waits for the included file to end.

The tokens themselves don't change, and a file with a line break after the
end of its last include reports the end as before. The .fiz files of the
wagons which broke the change of #100 (pkp/yb_v1, the directive at the very
end without a line break) are read through on staging already; a test now
keeps them that way.
2026-11-25 05:24:38 +01:00

39 KiB