Skip to content

Instantly share code, notes, and snippets.


Robert Ekendahl rekendahl

Block or report user

Report or block rekendahl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
rekendahl / scratch.kt
Created Nov 3, 2017
Kotlin list merge example
View scratch.kt
if (defines[macroName]?.body?.isNotEmpty() == true) {
val mergedList = mutableListOf<Pair<IElementType?, String?>>()
for (tokenInfo in defines[macroName]?.body.orEmpty()) {
val tokenType = tokenInfo.first
val tokenName = tokenInfo.second
when (tokenType) {
val lastToken = mergedList.last()
val nextToken = defines[macroName]?.body?.iterator()?.next()
You can’t perform that action at this time.