Skip to content

Commit 8214281

Browse files
committed
Mod -- has loader
1 parent 4ff9363 commit 8214281

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

TODO.md

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# module system
22

3-
Mod -- has loader
43
Place and Transition -- has modId
54

65
Mod has definitions: Map<string, Definition>

src/lang/mod/createMod.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ export function createMod(options: {
99
url: URL
1010
// text: string
1111
// stmts: Array<Stmt>
12-
// loader: Loader
12+
loader: Loader
1313
}): Mod {
1414
const mod = {
15-
// loader: options.loader,
15+
loader: options.loader,
1616
url: options.url,
1717
// text: options.text,
1818
// stmts: options.stmts,

src/loader/Loader.ts

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { Fetcher } from "../fetcher"
22
// import { execute } from "../lang/execute"
3-
import { Mod } from "../lang/mod"
4-
import { createMod } from "../lang/mod/createMod"
3+
import { Mod, createMod } from "../lang/mod"
54
// import { parseStmts } from "../lang/syntax"
65

76
export class Loader {
@@ -27,7 +26,7 @@ export class Loader {
2726

2827
// const stmts = parseStmts(text)
2928
const mod = createMod({
30-
// loader: this,
29+
loader: this,
3130
url,
3231
// text,
3332
// stmts,

0 commit comments

Comments
 (0)