File tree 5 files changed +46
-12
lines changed
5 files changed +46
-12
lines changed Original file line number Diff line number Diff line change 1
- # module system
2
-
3
- Mod has definitions: Map<string, Definition>
4
-
5
- # loader
6
-
7
- fix ` Loader ` -- parse and execute
8
-
9
- # command-line
1
+ copy command-line/ from inet-js
2
+ setup the ` run ` command
10
3
11
4
# net
12
5
@@ -20,6 +13,19 @@ fix `Loader` -- parse and execute
20
13
- everytime a marking changes,
21
14
loop through and try to execute every transitions.
22
15
16
+ # command-line
17
+
18
+ fix run command
19
+ add repl command
20
+
21
+ # syntax
22
+
23
+ parser
24
+
25
+ # loader
26
+
27
+ fix ` Loader ` -- parse and execute
28
+
23
29
# choice
24
30
25
31
[ maybe] as one kind of ` Transition `
@@ -29,9 +35,6 @@ fix `Loader` -- parse and execute
29
35
env
30
36
Stmt
31
37
32
- # syntax
33
-
34
- parser
35
38
36
39
# type system
37
40
Original file line number Diff line number Diff line change
1
+ import { AppConfig } from "./AppConfig"
2
+ import { AppHome } from "./AppHome"
3
+
4
+ export class App {
5
+ home = new AppHome ( )
6
+ config = new AppConfig ( )
7
+ }
Original file line number Diff line number Diff line change
1
+ export class AppConfig {
2
+ packageJson : any
3
+
4
+ constructor ( ) {
5
+ // NOTE We should not use import for module not in `src/`,
6
+ // otherwise `lib/` will have a extra level.
7
+ this . packageJson = require ( "../../package.json" )
8
+ }
9
+ }
Original file line number Diff line number Diff line change
1
+ import { LocalFileStore } from "@cicada-lang/framework/lib/file-stores/LocalFileStore"
2
+ import os from "os"
3
+ import Path from "path"
4
+ import process from "process"
5
+
6
+ export class AppHome extends LocalFileStore {
7
+ constructor ( ) {
8
+ super ( {
9
+ dir : process . env [ "INET_HOME" ] || Path . resolve ( os . homedir ( ) , ".inet" ) ,
10
+ } )
11
+ }
12
+ }
Original file line number Diff line number Diff line change
1
+ import { App } from "./App"
2
+
3
+ export const app = new App ( )
You can’t perform that action at this time.
0 commit comments