PageRenderTime 18ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/source/core/ast/CoverDecl.ooc

http://github.com/nddrylliog/oc
Unknown | 35 lines | 23 code | 12 blank | 0 comment | 0 complexity | b63d57dae538291aea01f661752c3eed MD5 | raw file
  1. import structs/[ArrayList, HashMap]
  2. import Expression, Scope, Type, Call
  3. import middle/Resolver
  4. CoverDecl: class extends Expression {
  5. body := Scope new()
  6. _type: Type
  7. resolved := false // artificial testing
  8. name: String { get set }
  9. init: func ~_cover {
  10. name = ""
  11. // type?
  12. }
  13. resolve: func (task: Task) {
  14. resolved = true // artificial testing
  15. task queue(body)
  16. }
  17. toString: func -> String {
  18. "cover " + body toString()
  19. }
  20. getType: func -> Type {
  21. _type
  22. }
  23. }