Skip to content

Instantly share code, notes, and snippets.

@CommanderTvis
Created July 28, 2020 15:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CommanderTvis/743c34da046a7861cd3a978b1ff75afa to your computer and use it in GitHub Desktop.
Save CommanderTvis/743c34da046a7861cd3a978b1ff75afa to your computer and use it in GitHub Desktop.
internal fun loadNumeric(value: Number) {
if (expectationStack.peek() == NUMBER_TYPE) {
loadNumberConstant(value, true)
expectationStack.pop()
typeStack.push(NUMBER_TYPE)
} else ...?.number(value)?.let { loadTConstant(it) }
?: error(...)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment