Skip to content

Commit

Permalink
fix(extract) invalid enum syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
Spasi committed Jan 9, 2025
1 parent 7634074 commit 2a31b4c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/extract/src/main/kotlin/org/lwjgl/extract/Parser.kt
Original file line number Diff line number Diff line change
Expand Up @@ -129,15 +129,15 @@ internal class Enum(
val v = if (renderValue) {
if (it.value.startsWith("0x") && it.value.length == 10)
", ${it.value}"
it.value
else
", \"${it.value}\""
"\"${it.value}\""
} else {
""
}
val n = "\"${if (noPrefix) it.name else it.name.substring(context.header.prefixConstant.length)}\""
"$n.enum($v)"
"$n.enum${if (v.isEmpty()) "" else "($v)"}"
}
.joinToString(",\n$t$t")}
)${if (noPrefix) ".noPrefix()" else ""}"""
Expand Down

0 comments on commit 2a31b4c

Please sign in to comment.