diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-10-05 18:05:07 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-10-05 18:05:07 -0400 |
| commit | c74fba540448f1d4b1aec4de8f3d9ffc395fdde0 (patch) | |
| tree | 67f2f62e2ccf1889ebbeef725a6782b8ba9f5912 /src/compile/expressions.c | |
| parent | 398d2cab6988e20c59e7037ff7ef551540339abb (diff) | |
Deprecate `deserialize` keyword and `.serialized()` method
Diffstat (limited to 'src/compile/expressions.c')
| -rw-r--r-- | src/compile/expressions.c | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/src/compile/expressions.c b/src/compile/expressions.c index 5ec90191..fcd1d136 100644 --- a/src/compile/expressions.c +++ b/src/compile/expressions.c @@ -205,19 +205,6 @@ Text_t compile(env_t *env, ast_t *ast) { case Lambda: return compile_lambda(env, ast); case MethodCall: return compile_method_call(env, ast); case FunctionCall: return compile_function_call(env, ast); - case Deserialize: { - ast_t *value = Match(ast, Deserialize)->value; - type_t *value_type = get_type(env, value); - if (!type_eq(value_type, Type(ListType, Type(ByteType)))) - code_err(value, "This value should be a list of bytes, not a ", type_to_text(value_type)); - type_t *t = parse_type_ast(env, Match(ast, Deserialize)->type); - return Texts("({ ", compile_declaration(t, Text("deserialized")), - ";\n" - "generic_deserialize(", - compile(env, value), ", &deserialized, ", compile_type_info(t), - ");\n" - "deserialized; })"); - } case ExplicitlyTyped: { return compile_to_type(env, Match(ast, ExplicitlyTyped)->ast, get_type(env, ast)); } |
