-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsolution.go
More file actions
39 lines (29 loc) · 725 Bytes
/
solution.go
File metadata and controls
39 lines (29 loc) · 725 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package main
import (
"os"
"github.com/sundown/solution/pilot"
"github.com/sundown/solution/prism"
"github.com/sundown/solution/subtle"
"github.com/sundown/solution/tiny"
)
func main() {
if len(os.Args) >= 2 && os.Args[1] == "test" {
prism.Notify("Starting Pilot Tests")
pilot.Pilot()
os.Exit(0)
}
prism.Notify("Solution init...")
// Make environment and intern buildin functions
env := prism.NewEnvironment()
// Parse all arguments
prism.Init(env)
// Open file, lex, and close
prism.Lex(env)
// Parse lexed tokens to AST
subtle.Parse(env)
tiny.Entry(env)
// Compile AST to LLVM
// apotheosis.Compile(env)
// // Write LLVM IR to file or invoke Clang on LLVM Bitcode
// prism.Emit(env)
}