AST testing
I should probably write some systematic tests for the AST parsing process. I think the tree-sitter part is okay-ish covered (as in, I didn't make a bad experience yet).
However, testing the parsed AST is not yet implemented. Right now its just eyeballing the default.vola
file. I think it would be a good idea to implement (or find) a #[derive(sexpr)]
macro, that allows us to serialize any AST into a sexpr. That could then be string-checked.
Implementing this only makes sense once I settled for a somewhat stable AST structure.
Todo:
-
implement serde serialize/deserialize on all AST structs. -
use this crate to implement a to_sexpr
function on all -
bottom up implement tests that check all things algebraic and combinatorics. Most interesting is operator precedence and the correct tree building from a given optree.
Edited by Tendsin Mende