kotlinx / ast

Generic AST parsing library for kotlin multiplatform
Apache License 2.0
326 stars 23 forks source link

incorrect breakline parsing #104

Open ityoung opened 10 months ago

ityoung commented 10 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 8 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.