Skip to content

Commit

Permalink
[builtin] mod has builtins
Browse files Browse the repository at this point in the history
  • Loading branch information
xieyuheng committed Sep 5, 2023
1 parent 9640947 commit c427417
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
[builtin] `Builtin` as a word
[builtin] `Builtin` -- syntax
[builtin] add `@` as prefix to all builtins
[builtin] remove `isPrivate` from Definition

# articles

[docs] 反应网编程 -- 完成 `mul` 的讲解
Expand Down
1 change: 1 addition & 0 deletions src/lang/mod/Mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ export type Mod = {
text: string
stmts: Array<Stmt>
definitions: Map<string, Definition>
builtins: Map<string, Definition>
ruleEntries: Map<string, RuleEntry>
requiredMods: Map<string, Mod>
}
1 change: 1 addition & 0 deletions src/lang/mod/createMod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export function createMod(options: {
text: options.text,
stmts: options.stmts,
definitions: new Map(),
builtins: new Map(),
ruleEntries: new Map(),
requiredMods: new Map(),
} as Mod
Expand Down

0 comments on commit c427417

Please sign in to comment.