From 3b3071adb0665b527023287439c13f59fa15eb17 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Mon, 13 May 2024 21:07:27 -0400 Subject: [PATCH] capture unvalidated notes from parser as todos --- janet/validate.janet | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/janet/validate.janet b/janet/validate.janet index 5395d91..5f803f9 100644 --- a/janet/validate.janet +++ b/janet/validate.janet @@ -14,6 +14,8 @@ Tracking here, before I start writing this code, the kinds of validation we're h * [ ] `loop` form arity checking * [ ] arity checking of explicit named function calls * [ ] flag tail calls + +Imports are for a later iteration of Ludus: * [ ] no circular imports DEFERRED * [ ] correct imports DEFERRED @@ -151,6 +153,23 @@ Tracking here, before I start writing this code, the kinds of validation we're h (set (ctx name) ast) validator) +(def types [ + :nil + :number + :keyword + :bool + :string + :set + :tuple + :dict + :list + :fn + :ref + :pkg + :ns + : +]) + (defn- pattern* [validator] (def ast (validator :ast)) (def type (ast :type)) @@ -227,7 +246,7 @@ Tracking here, before I start writing this code, the kinds of validation we're h ### TODO: # * [ ] arity checking if first term is name that resolves to a function and args aren't partial -# * [ ] ensure properties are on pkgs (prev term in synth is a pkg) +# * [ ] ensure properties are on pkgs (if *only* pkgs from root) # * [ ] flag tail calls (where last term is not-partial args) (defn- synthetic [validator] (def ast (validator :ast)) @@ -259,6 +278,8 @@ Tracking here, before I start writing this code, the kinds of validation we're h (defn- panic [validator]) +(defn- testt [validator]) + (defn- validate* [validator] (def ast (validator :ast)) (def type (ast :type))