Skip to content

Commit

Permalink
defn -- type check -- cut -- words composition
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Aug 4, 2023
1 parent 1987753 commit bd6fc65
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# type

`defn` -- type check -- cut -- words composition

`defn` -- can be a sequence of words that build a net

- need to design syntax to declare input and output types
Expand Down
5 changes: 5 additions & 0 deletions src/lang/stmts/Defn.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { createCtx } from "../ctx/createCtx"
import { cutWords } from "../cut/cutWords"
import * as Definitions from "../definition"
import { Mod } from "../mod"
import { define } from "../mod/define"
Expand All @@ -13,6 +15,9 @@ export class Defn implements Stmt {
) {}

async execute(mod: Mod): Promise<void> {
const ctx = createCtx()
cutWords(mod, ctx, this.words, {})

define(
mod,
this.name,
Expand Down

0 comments on commit bd6fc65

Please sign in to comment.