From f1a1e9ec623db8d7673111c1ca5277f1276ecf52 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Fri, 10 May 2024 15:02:37 -0400 Subject: [PATCH] notes towards an ast-validator --- janet/validate.janet | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 janet/validate.janet diff --git a/janet/validate.janet b/janet/validate.janet new file mode 100644 index 0000000..98f0745 --- /dev/null +++ b/janet/validate.janet @@ -0,0 +1,15 @@ +### 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 + +)