How can I solve this without assigning `parser.cu...
# codereview
e
How can I solve this without assigning
parser.currentToken
to a new variable?
Copy code
var n = parser.advanceToNextToken() ?: parseError("unexpected end of file") // n type Token
        while (n.type != Tt.CLOSE_BRACKET) {
            if (n.type != Tt.KEY) parseError("unexpected token, expected TOK_KEY", n)
            elements[n.stringContents] = Element(n, parser)
            n = parser.currentToken ?: kotlin.run {
                if (topLevel) break // error
                parseError("unexpected end of file", parser.lastToken)
            }
        }