From 6168541bd5bb141c40a1e2a909afa84441b35ed5 Mon Sep 17 00:00:00 2001 From: Ilya Ryzhenkov Date: Sat, 12 Jul 2014 18:29:20 +0400 Subject: Support enums in model --- src/Generation/KotlinSignatureGenerator.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/Generation/KotlinSignatureGenerator.kt') 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") } -- cgit