rxi / fe

A tiny, embeddable language implemented in ANSI C
MIT License
1.3k stars 81 forks source link

Tiny improvement for `read_()` #25

Open ooichu opened 1 year ago

ooichu commented 1 year ago

Before this change, if the line break was \r, comments didn't work correctly.

ooichu commented 1 year ago

As a consequence, if you open a file which uses \r as line termination, any ; will comment out the entire file. This will not happen (it is probably not 100% portable) if you open a file with the flag "r" instead of "rb".

ooichu commented 1 year ago

Found a little bug. After opening context gcstack_idx is equal to 4. This happens because the stack index is saved after the t symbol is created.