class Token { lateinit var content: String lateinit var type: TokenType var lineNumber: Int = 0 } /** * Finds the next non empty token by [index] */ fun nextNonEmpty(statement: MutableList, index: Int): Token { var i = index + 1 while (statement[i].type == TokenType.Empty) i++ return statement[i] }