Strumenta / antlr-kotlin

Support for Kotlin as a target for ANTLR 4
Apache License 2.0
221 stars 47 forks source link

Properly assign values to multiple labels #150

Closed lppedd closed 7 months ago

lppedd commented 7 months ago

Being the template had been copied over from the Java runtime, multiple labels were being assigned a value like:

x = y = z = match(Tokens.ID)

Chained assignments aren't supported in Kotlin, so the new version uses:

val _token = match(Tokens.ID)
x = _token
y = _token
z = _token
lppedd commented 7 months ago

Worth creating a release after this is merged?

If you still have doubts about this, I'll revert that commit.

ftomassetti commented 7 months ago

Worth creating a release after this is merged?

If you still have doubts about this, I'll revert that commit.

Yes, please, revert that commit and I will then merge and do a release

lppedd commented 7 months ago

@ftomassetti done.