- Error handling to signal what is preventing evaluation instead of
program crash
- Small editor feature (allow edit new
line of code to complete the previous ones instead of destroying the
input, if an empty line inserted return the error preventing evaluation
- Auto indentation on multiline input based on depth
Still does not parse multi-statement code
- This is a problem when dealing with macros: does not allow
expressions like `'()` since the atomic `'` hides the list ().
Need to chose between:
- Replace `'...` with `(quote ... )` during tokenization (may be
hard to implement macros later)
- Allows multi-statement code (this also allows to execute multiple
statements when reading a file)
Will probably delete auto-indentation since it breaks code's uniformity
too much
This step consists of creating the AST to represent the input
expression, the only evaluation done for now is the recognition of three
MalTypes for the nodes of the AST:
- Symbols: atomic isolated groups of characters
- Integers: Symbols that can be parsed as number and are treated as so
- Lists: recognizable by the presence of parentheses (only "()" for now,
"[]" and "{}" later), these can contain any number of MalTypes
The second half of this step (much easier) is to reconstruct the
original syntax (with clean whitespaces) to check the correctness of the
process
Signed-off-by: teo3300 <matteo.rogora@live.it>