PageRenderTime 8ms CodeModel.GetById 1ms RepoModel.GetById 2ms app.codeStats 0ms

/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. use oc
  2. import structs/ArrayList
  3. import text/Opts
  4. import frontend/[BuildParams, Driver]
  5. import DynamicLoader
  6. main: func (mainArgs: ArrayList<String>) {
  7. opts := Opts new(mainArgs)
  8. params := BuildParams new(opts opts)
  9. if(opts args empty?()) {
  10. "Usage: oc file.ooc" println()
  11. exit(1)
  12. }
  13. DynamicLoader init(params)
  14. args := opts args
  15. args each(|arg|
  16. Driver compile(arg, params)
  17. )
  18. DynamicLoader exit()
  19. }