Skip to content

Commit 10064a5

Browse files
committed
Small fixes
1 parent 56610f8 commit 10064a5

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

annotations/src/main/kotlin/be/bluexin/luajksp/annotations/LKExposed.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@ package be.bluexin.luajksp.annotations
33
import org.luaj.vm2.LuaValue
44

55
interface LKExposed {
6+
@LuajExclude // TODO : make this work from interface ; we should never need this exposed
67
fun toLua(): LuaValue
78
}

processor/src/main/kotlin/be/bluexin/luajksp/LKSymbolProcessor.kt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ class LKSymbolProcessor(
2626
}
2727

2828
private fun processInternal(resolver: Resolver): List<KSAnnotated> = resolver
29-
.getSymbolsWithAnnotation(LuajExpose::class.qualifiedName!!).filterNot {
30-
if ((it is KSClassDeclaration) && it.validate()) {
29+
.getSymbolsWithAnnotation(LuajExpose::class.qualifiedName!!)
30+
.filter { it is KSClassDeclaration }.filter {
31+
if (it.validate()) {
3132
it.accept(LKVisitor.Internal(it.expose!!, logger), mutableMapOf())
3233
.also { props -> kotlinGen.generate(it as KSDeclaration, props) }
3334
.also { props -> luaGen.generate(it as KSDeclaration, props) }
3435
.also { props -> tsGen.generate(it as KSDeclaration, props) }
35-
true
36-
} else false
36+
false
37+
} else true
3738
}.toList()
3839

3940
private fun processExternal(resolver: Resolver): List<KSAnnotated> = resolver

0 commit comments

Comments
 (0)