PageRenderTime 42ms CodeModel.GetById 40ms app.highlight 0ms RepoModel.GetById 1ms app.codeStats 1ms

/source/core/ast/StringLit.ooc

http://github.com/nddrylliog/oc
Unknown | 22 lines | 14 code | 8 blank | 0 comment | 0 complexity | 1780d4ee5278386668b61f770241399d MD5 | raw file
 1
 2import Expression, Type
 3import middle/Resolver
 4
 5StringLit: class extends Expression {
 6
 7    value: String
 8    type := static BaseType new("String")
 9
10    init: func (=value) {}
11
12    resolve: func (task: Task) {
13        task queue(type)
14    }
15
16    getType: func -> Type { type }
17
18    toString: func -> String {
19        "\"" + value + "\""
20    }
21
22}