Update AbstractCommandValueParameter.render style

This commit is contained in:
Karlatemp 2020-11-09 13:16:44 +08:00
parent 1a5355db89
commit 8b6e2a1d9c
No known key found for this signature in database
GPG Key ID: 21FBDDF664FF06F8

View File

@ -174,7 +174,8 @@ internal class CommandReflector(
is AbstractCommandValueParameter.Extended,
is AbstractCommandValueParameter.UserDefinedType<*>,
-> {
"<${this.name ?: this.type.classifierAsKClass().simpleName}>"
val nameToRender = this.name ?: this.type.classifierAsKClass().simpleName
if (isOptional) "[$nameToRender]" else "<$nameToRender>"
}
is AbstractCommandValueParameter.StringConstant -> {
this.expectingValue