kotlinx / ast

Generic AST parsing library for kotlin multiplatform
Apache License 2.0
316 stars 22 forks source link

incorrect breakline parsing #104

Open ityoung opened 7 months ago

ityoung commented 7 months ago
open class A(private val b: B) : C
(b) {

this will raise error: org.antlr.v4.kotlinruntime.misc.ParseCancellationException

but without breakline runs success:

open class A(private val b: B) : C(b) {
drieks commented 6 months ago

Hi, thank you for reporting. I think this is a bug in the Kotlin ANTLR-Grammar, because kotlinx.ast is using a copy of this grammar to parse the kotlin source with antlr and this exception is comming from antlr.

I want to update this library in the next time, I will have a look at this issue then.