diff options
| author | Michael Williamson <mike@zwobble.org> | 2026-08-08 22:24:28 +0100 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2026-08-08 22:24:28 +0100 |
| commit | 6dd8f8fe274e11348b631abcf67ee7ccf8254997 (patch) | |
| tree | 19705c1063b933022edd0893539ebbd42f101535 /src/main/java/org/zwobble | |
| parent | c73f1e515363ef16ea2513533f11710b78643693 (diff) | |
Handle all simple types in one branch
Diffstat (limited to 'src/main/java/org/zwobble')
| -rw-r--r-- | src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatransient0/JavaTransient0Generator.java | 60 |
1 files changed, 6 insertions, 54 deletions
diff --git a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatransient0/JavaTransient0Generator.java b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatransient0/JavaTransient0Generator.java index 3c2b33c..ff9b1e9 100644 --- a/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatransient0/JavaTransient0Generator.java +++ b/src/main/java/org/zwobble/hobgoblin/compiler/output/generators/javatransient0/JavaTransient0Generator.java @@ -735,35 +735,11 @@ public class JavaTransient0Generator implements Generator { } } - case EnumType enumType -> { + case SimpleType simpleType -> { yield List.of(generateEncode( value, - enumType.namespaceName(), - enumType - )); - } - - case SimpleNativeType simpleNativeType -> { - yield List.of(generateEncode( - value, - simpleNativeType.namespaceName(), - simpleNativeType - )); - } - - case StructType structType -> { - yield List.of(generateEncode( - value, - structType.namespaceName(), - structType - )); - } - - case SumType sumType -> { - yield List.of(generateEncode( - value, - sumType.namespaceName(), - sumType + simpleType.namespaceName(), + simpleType )); } @@ -811,35 +787,11 @@ public class JavaTransient0Generator implements Generator { } } - case EnumType enumType -> { - yield List.of(generateDecode( - target, - enumType.namespaceName(), - enumType - )); - } - - case SimpleNativeType simpleNativeType -> { - yield List.of(generateDecode( - target, - simpleNativeType.namespaceName(), - simpleNativeType - )); - } - - case StructType structType -> { - yield List.of(generateDecode( - target, - structType.namespaceName(), - structType - )); - } - - case SumType sumType -> { + case SimpleType simpleType -> { yield List.of(generateDecode( target, - sumType.namespaceName(), - sumType + simpleType.namespaceName(), + simpleType )); } |
