Object is always parsed empty
mbolotov opened this issue · 2 comments
mbolotov commented
object node is always parsed empty.
Parsing this piece of code
object MyObject {
fun myFun() {}
}
class MyClass {
fun myFun() {}
}
produces the following AST:
PackageHeader(identifier=[])
DefaultAstNode(description=importList, children=[])
KlassDeclaration(keyword=object, identifier=KlassIdentifier(identifier=MyObject, parameter=[], nullable=false, raw=null), type=null, annotations=[], modifiers=[], parameter=[], typeParameters=[], inheritance=[], expressions=[], raw=null)
KlassDeclaration(keyword=class, identifier=KlassIdentifier(identifier=MyClass, parameter=[], nullable=false, raw=null), type=null, annotations=[], modifiers=[], parameter=[], typeParameters=[], inheritance=[], expressions=[DefaultAstNode(description=classBody, children=[KlassDeclaration(keyword=fun, identifier=KlassIdentifier(identifier=myFun, parameter=[], nullable=false, raw=null), type=null, annotations=[], modifiers=[], parameter=[], typeParameters=[], inheritance=[], expressions=[], raw=null)])], raw=null)
MyClass shows myFun
node while MyObject does not.
Lib version is 'com.github.kotlinx.ast:grammar-kotlin-parser-antlr-kotlin:c7dd6bbd54'
drieks commented
mbolotov commented
it works for me, thanks!
closing this issue