Skip to content

Commit

Permalink
Remove println
Browse files Browse the repository at this point in the history
  • Loading branch information
lauzadis committed Aug 8, 2024
1 parent e52545f commit 417f843
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,6 @@ open class XmlParserGenerator(
target.type == ShapeType.BLOB -> writer.format("#T { it.#T() } ", RuntimeTypes.Serde.parse, RuntimeTypes.Core.Text.Encoding.decodeBase64Bytes)
target.type == ShapeType.BOOLEAN -> writer.format("#T()", RuntimeTypes.Serde.parseBoolean)
target.type == ShapeType.STRING && !target.hasTrait<EnumTrait>() -> {
println("Shape ${member.defaultName()} is a string! textExprIsResult is $textExprIsResult")
if (!textExprIsResult) {
writer.write(textExpr)
return
Expand All @@ -603,22 +602,18 @@ open class XmlParserGenerator(
target.type == ShapeType.BIG_DECIMAL -> writer.format("#T()", RuntimeTypes.Serde.parseBigDecimal)
target.type == ShapeType.BIG_INTEGER -> writer.format("#T()", RuntimeTypes.Serde.parseBigInteger)
target.type == ShapeType.ENUM || (target.type == ShapeType.STRING && target.hasTrait<EnumTrait>()) -> {
println("Shape ${member.defaultName()} is an enum! textExprIsResult is $textExprIsResult")
if (!textExprIsResult) {
writer.write("#T.fromValue(#L)", ctx.symbolProvider.toSymbol(target), textExpr)
return
} else {
writer.format("#T { #T.fromValue(it) } ", RuntimeTypes.Serde.parse, ctx.symbolProvider.toSymbol(target)).also {
println("Shape ${member.defaultName()} is an enum, parseFn is $it")
}
writer.format("#T { #T.fromValue(it) } ", RuntimeTypes.Serde.parse, ctx.symbolProvider.toSymbol(target))
}
}
target.type == ShapeType.INT_ENUM -> {
writer.format("#T { #T.fromValue(it.toInt()) } ", RuntimeTypes.Serde.parse, ctx.symbolProvider.toSymbol(target))
}
else -> error("unknown primitive member shape $member")
}
println("parseFn for ${member.defaultName()}: $parseFn")

val escapedErrMessage = "expected $target".replace("$", "$$")
writer.write(textExpr)
Expand Down

0 comments on commit 417f843

Please sign in to comment.