/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
- import structs/[ArrayList, HashMap]
- import Expression, Scope, Type, Call
- import middle/Resolver
- CoverDecl: class extends Expression {
- body := Scope new()
- _type: Type
- resolved := false // artificial testing
-
- name: String { get set }
-
- init: func ~_cover {
- name = ""
- // type?
- }
-
- resolve: func (task: Task) {
- resolved = true // artificial testing
- task queue(body)
- }
-
- toString: func -> String {
- "cover " + body toString()
- }
- getType: func -> Type {
- _type
- }
- }