PageRenderTime 422ms CodeModel.GetById 185ms app.highlight 1ms RepoModel.GetById 235ms app.codeStats 1ms

/source/launcher/main.ooc

http://github.com/nddrylliog/oc
Unknown | 28 lines | 19 code | 9 blank | 0 comment | 0 complexity | 624bc808f055d3c6d2da427612eaff38 MD5 | raw file
 1
 2use oc
 3
 4import structs/ArrayList
 5import text/Opts
 6
 7import frontend/[BuildParams, Driver]
 8import DynamicLoader
 9
10main: func (mainArgs: ArrayList<String>) {
11
12    opts := Opts new(mainArgs)
13    params := BuildParams new(opts opts)
14    if(opts args empty?()) {
15        "Usage: oc file.ooc" println()
16        exit(1)
17    }
18    
19    DynamicLoader init(params)
20    
21    args := opts args
22    args each(|arg|
23        Driver compile(arg, params)
24    )
25    
26    DynamicLoader exit()
27    
28}