Collate TODOs; comment repl cruft
This commit is contained in:
parent
c6eeed4f4c
commit
776f975d54
41
TODO.xit
41
TODO.xit
|
@ -1,14 +1,39 @@
|
||||||
[ ] Wire up interpreter for spawn and receive
|
|
||||||
[ ] Write send function
|
[x] Fix recursive definition problems in grammar.clj
|
||||||
|
|
||||||
|
TODOS from interpreter
|
||||||
|
[ ] implement tuple splat patterns
|
||||||
|
[ ] update match-list to use new AST representation
|
||||||
|
[ ] fix length comparison when pattern includes splats
|
||||||
|
[ ] update match-dict to use new AST representation
|
||||||
|
[ ] update match-struct to use new AST representation
|
||||||
|
[ ] update interpret-receive to use new AST representation
|
||||||
|
[ ] Check interpret-fn-inner ctx for cycles/bugs
|
||||||
|
|
||||||
|
Re-add processes to the language
|
||||||
|
[ ] Write send as function
|
||||||
|
[ ] update interpret-spawn to use new AST representation
|
||||||
[ ] ---- Investigate weird timing issue in current send implementation
|
[ ] ---- Investigate weird timing issue in current send implementation
|
||||||
[ ] Investigate with-bindings and virtual threads
|
[ ] Investigate `with-bindings` and virtual threads
|
||||||
|
|
||||||
[ ] Fix recursive definition problems in grammar.clj
|
|
||||||
|
|
||||||
|
Finish interpreter
|
||||||
[ ] Wire up new interpreter to repl, script situation
|
[ ] Wire up new interpreter to repl, script situation
|
||||||
|
|
||||||
[ ] Write compiler
|
|
||||||
|
|
||||||
[ ] Merge new interpreter
|
[ ] Merge new interpreter
|
||||||
|
|
||||||
|
Write a compiler: desugaring
|
||||||
|
[ ] `...` to `..._` in tuple & list patterns
|
||||||
|
[ ] placeholder partial application to anonymous lambda
|
||||||
|
[ ] word -> :[word] word in pairs (patterns & expressions)
|
||||||
|
|
||||||
|
Write a compiler: correctness
|
||||||
|
[ ] check for unbound names
|
||||||
|
[ ] check for re-binding names
|
||||||
|
[ ] check that recur is in tail position
|
||||||
|
[ ] check that recur is only called inside loop or fn forms
|
||||||
|
[ ] check ns accesses
|
||||||
|
|
||||||
|
Write a compiler: optimization
|
||||||
|
[ ] devise tail call optimization
|
||||||
|
|
||||||
|
Next steps
|
||||||
[ ] Get drawing working?
|
[ ] Get drawing working?
|
||||||
|
|
|
@ -273,37 +273,39 @@
|
||||||
|
|
||||||
;;; REPL
|
;;; REPL
|
||||||
|
|
||||||
(def source
|
(comment
|
||||||
"2"
|
|
||||||
)
|
|
||||||
|
|
||||||
(def rule (literal))
|
(def source
|
||||||
|
"if 1 then 2 else 3"
|
||||||
|
)
|
||||||
|
|
||||||
(def tokens (-> source scan/scan :tokens))
|
(def rule (literal))
|
||||||
|
|
||||||
(def result (apply-parser literal tokens))
|
(def tokens (-> source scan/scan :tokens))
|
||||||
|
|
||||||
|
(def result (apply-parser script tokens))
|
||||||
|
|
||||||
|
|
||||||
(defn report [node]
|
(defn report [node]
|
||||||
(when (fail? node) (err-msg node))
|
(when (fail? node) (err-msg node))
|
||||||
node)
|
node)
|
||||||
|
|
||||||
(defn clean [node]
|
(defn clean [node]
|
||||||
(if (map? node)
|
(if (map? node)
|
||||||
(-> node
|
(-> node
|
||||||
(report)
|
(report)
|
||||||
(dissoc
|
(dissoc
|
||||||
;:status
|
;:status
|
||||||
:remaining
|
:remaining
|
||||||
:token)
|
:token)
|
||||||
(update :data #(into [] (map clean) %)))
|
(update :data #(into [] (map clean) %)))
|
||||||
node))
|
node))
|
||||||
|
|
||||||
(defn tap [x] (println "\n\n\n\n******NEW RUN\n\n:::=> " x "\n\n") x)
|
(defn tap [x] (println "\n\n\n\n******NEW RUN\n\n:::=> " x "\n\n") x)
|
||||||
|
|
||||||
(def my-data (-> result
|
(def my-data (-> result
|
||||||
clean
|
clean
|
||||||
tap
|
tap
|
||||||
))
|
))
|
||||||
|
|
||||||
(println my-data)
|
(println my-data))
|
|
@ -718,7 +718,7 @@
|
||||||
(defn- interpret-literal [ast] (-> ast :data first))
|
(defn- interpret-literal [ast] (-> ast :data first))
|
||||||
|
|
||||||
(defn interpret-ast [ast ctx]
|
(defn interpret-ast [ast ctx]
|
||||||
(println "interpreting ast type" (:type ast))
|
;(println "interpreting ast type" (:type ast))
|
||||||
;(println "AST: " ast)
|
;(println "AST: " ast)
|
||||||
(case (:type ast)
|
(case (:type ast)
|
||||||
|
|
||||||
|
@ -865,9 +865,8 @@
|
||||||
|
|
||||||
|
|
||||||
(do
|
(do
|
||||||
(process/start-vm)
|
|
||||||
(def source "
|
(def source "
|
||||||
ref a = 1
|
if 1 then 2 else 3
|
||||||
")
|
")
|
||||||
|
|
||||||
(println "")
|
(println "")
|
||||||
|
@ -885,9 +884,6 @@
|
||||||
(println result)
|
(println result)
|
||||||
result))
|
result))
|
||||||
|
|
||||||
|
|
||||||
(show/show false)
|
|
||||||
|
|
||||||
(comment "
|
(comment "
|
||||||
|
|
||||||
Left to do:
|
Left to do:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user