I am trying to understand this answer: https://mcmap.net/q/442358/-how-can-i-do-a-line-break-line-continuation-in-kotlin and particularly this part:
if the first line of the statement is a valid statement, it won't work:
val text = "This " + "is " + "a " + "long " + "long " + "line" // syntax error
This does not seem to be the case for the dot operator:
val text = obj
.getString()
How does this work? I'm looking at the grammar (https://kotlinlang.org/docs/reference/grammar.html) but am not sure what to look for to understand the difference. Is it built into the language outside of the grammar rules, or is it a grammar rule?