Refactor the class hierarchy for parser states so that
there is a parser state that acts more like a type and
one that acts more like a value (the latter, then, serves
as the base class for the other instantiated parser states).
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
Fields were not given default values when a struct was declared
without initializers.
Also, cleanup code in the helper function for binary operations
on struct instances.
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
1. Add support for field access
2. Add support for proper type checking of array access
3. Add tests for nested field and array access
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
Compilation interface(s) now contain a compilation context.
The change will make it easier to expand on what each step
of the compilation process needs to know to complete its task
without having to make major changes to the interface.
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
1. Semicolons were required in the wrong spot.
2. Make semicolons "invisible" (from the tree-sitter perspective).
Signed-off-by: Will Hawkins <hawkinsw@obs.cr>