aboutsummaryrefslogtreecommitdiff
path: root/src/Generation
diff options
context:
space:
mode:
Diffstat (limited to 'src/Generation')
-rw-r--r--src/Generation/JavaSignatureGenerator.kt4
-rw-r--r--src/Generation/KotlinSignatureGenerator.kt4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/Generation/JavaSignatureGenerator.kt b/src/Generation/JavaSignatureGenerator.kt
index 6ba9ac88..774eaeb4 100644
--- a/src/Generation/JavaSignatureGenerator.kt
+++ b/src/Generation/JavaSignatureGenerator.kt
@@ -8,6 +8,8 @@ class JavaSignatureGenerator : SignatureGenerator {
Kind.Package -> renderPackage(node)
Kind.Class,
Kind.Interface,
+ Kind.Enum,
+ Kind.EnumItem,
Kind.Object -> renderClass(node)
Kind.TypeParameter -> renderTypeParameter(node)
@@ -83,6 +85,8 @@ class JavaSignatureGenerator : SignatureGenerator {
when (node.kind) {
Kind.Class -> append("class ")
Kind.Interface -> append("interface ")
+ Kind.Enum -> append("enum ")
+ Kind.EnumItem -> append("enum value ")
Kind.Object -> append("class ")
else -> throw IllegalArgumentException("Node $node is not a class-like object")
}
diff --git a/src/Generation/KotlinSignatureGenerator.kt b/src/Generation/KotlinSignatureGenerator.kt
index 481e5133..50704f1c 100644
--- a/src/Generation/KotlinSignatureGenerator.kt
+++ b/src/Generation/KotlinSignatureGenerator.kt
@@ -8,6 +8,8 @@ class KotlinSignatureGenerator : SignatureGenerator {
Kind.Package -> renderPackage(node)
Kind.Class,
Kind.Interface,
+ Kind.Enum,
+ Kind.EnumItem,
Kind.Object -> renderClass(node)
Kind.TypeParameter -> renderTypeParameter(node)
@@ -75,6 +77,8 @@ class KotlinSignatureGenerator : SignatureGenerator {
when (node.kind) {
Kind.Class -> append("class ")
Kind.Interface -> append("trait ")
+ Kind.Enum -> append("enum class ")
+ Kind.EnumItem -> append("enum val ")
Kind.Object -> append("object ")
else -> throw IllegalArgumentException("Node $node is not a class-like object")
}