2024-05-10 19:02:37 +00:00
|
|
|
### A validator for a Ludus AST
|
|
|
|
|
|
|
|
(comment
|
|
|
|
|
|
|
|
Tracking here, before I start writing this code, the kinds of validation we're hoping to accomplish:
|
|
|
|
|
|
|
|
* splats come at the end of list, tuple, and dict patterns
|
|
|
|
* no unbound names
|
|
|
|
* no re-bound names
|
|
|
|
* correct imports
|
|
|
|
* no unbound names with `use` forms
|
|
|
|
* no circular imports
|
|
|
|
* first-level property access with pkg, e.g. `Foo :bar`--bar must be on Foo
|
2024-05-10 20:10:27 +00:00
|
|
|
* recur in tail position in `loop` forms
|
|
|
|
* recur not called outside of `loop` forms
|
2024-05-10 19:02:37 +00:00
|
|
|
|
|
|
|
)
|