From 3903f10c8dd9637bd2d1afed1c18fbcbd0e7fef4 Mon Sep 17 00:00:00 2001 From: Scott Richmond Date: Fri, 31 May 2024 13:29:51 -0400 Subject: [PATCH] update in-code project management --- janet/interpreter.janet | 18 ++++++++++++++---- janet/validate.janet | 4 ++-- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/janet/interpreter.janet b/janet/interpreter.janet index 35285ea..15d1e77 100644 --- a/janet/interpreter.janet +++ b/janet/interpreter.janet @@ -456,16 +456,24 @@ (def last-fn (interpret last-term ctx)) (call-fn last-fn [prev])) +# TODO for Computer Class (defn- pkg [ast ctx] (todo "pkgs")) -(defn- ns [ast ctx] (todo "nses")) - (defn- loopp [ast ctx] (todo "loops")) (defn- recur [ast ctx] (todo "recur")) +# TODO for 0.1.0 (defn- testt [ast ctx] (todo "test")) +(defn- ns [ast ctx] (todo "nses")) + +(defn- importt [ast ctx] (todo "imports")) + +(defn- withh [ast ctx] (todo "with")) + +(defn- usee [ast ctx] (todo "use")) + (defn- interpret* [ast ctx] (print "interpreting node " (ast :type)) (case (ast :type) @@ -500,8 +508,7 @@ :word (word ast ctx) :interpolated (interpolated ast ctx) :ref (ref ast ctx) - # :ns (ns ast ctx) - # :pkg (pkg ast ctx) + :pkg (pkg ast ctx) # patterned forms :let (lett ast ctx) @@ -519,6 +526,9 @@ # deferred until after computer class # :with (withh ast ctx) # :import (importt ast ctx) + # :ns (ns ast ctx) + # :use (usee ast ctx) + # :test (testt ast ctx) )) diff --git a/janet/validate.janet b/janet/validate.janet index 14b159d..12b0a05 100644 --- a/janet/validate.janet +++ b/janet/validate.janet @@ -5,8 +5,8 @@ Tracking here, before I start writing this code, the kinds of validation we're hoping to accomplish: * [x] ensure called keywords are only called w/ one arg -* [ ] first-level property access with pkg, e.g. `Foo :bar`--bar must be on Foo - - [ ] accept pkg-kws +* [x] first-level property access with pkg, e.g. `Foo :bar`--bar must be on Foo + - [x] accept pkg-kws * [x] validate dict patterns * [x] compile string-patterns * [x] `loop` form arity checking