This is a trivial problem, but the compiler crashed when I tried to compile an empty file.
$ ante empty.an
empty.an:1:1 error: failed trying to parse a term
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\error\mod.rs:203:79
stack backtrace:
...
In languages that do not have or require entry points, such as the main function, an empty file is often valid input and nothing is done as a result of execution.
So I've modified the compiler to immediately terminate if the input is an empty file.
This is a trivial problem, but the compiler crashed when I tried to compile an empty file.
In languages that do not have or require entry points, such as the main function, an empty file is often valid input and nothing is done as a result of execution.
So I've modified the compiler to immediately terminate if the input is an empty file.