aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ast.c1
-rw-r--r--ast.h5
-rw-r--r--compile.c5
-rw-r--r--typecheck.c1
4 files changed, 1 insertions, 11 deletions
diff --git a/ast.c b/ast.c
index 23f1409d..b960a2e1 100644
--- a/ast.c
+++ b/ast.c
@@ -164,7 +164,6 @@ CORD ast_to_xml(ast_t *ast)
T(DocTest, "<DocTest>%r<output>%r</output></DocTest>", optional_tagged("expression", data.expr), xml_escape(data.output))
T(Use, "<Use>%r%r</Use>", optional_tagged("var", data.var), xml_escape(data.path))
T(InlineCCode, "<InlineCode>%r</InlineCode>", xml_escape(data.code))
- T(Serialize, "<Serialize>%r</Serialize>", ast_to_xml(data.value))
T(Deserialize, "<Deserialize><type>%r</type>%r</Deserialize>", type_ast_to_xml(data.type), ast_to_xml(data.value))
default: return "???";
#undef T
diff --git a/ast.h b/ast.h
index 173b3178..dbc14ece 100644
--- a/ast.h
+++ b/ast.h
@@ -146,7 +146,7 @@ typedef enum {
DocTest,
Use,
InlineCCode,
- Serialize, Deserialize,
+ Deserialize,
} ast_e;
struct ast_s {
@@ -330,9 +330,6 @@ struct ast_s {
} InlineCCode;
struct {
ast_t *value;
- } Serialize;
- struct {
- ast_t *value;
type_ast_t *type;
} Deserialize;
} __data;
diff --git a/compile.c b/compile.c
index f4068935..9c1a16f0 100644
--- a/compile.c
+++ b/compile.c
@@ -3376,11 +3376,6 @@ CORD compile(env_t *env, ast_t *ast)
code_err(call->fn, "This is not a function, it's a %T", fn_t);
}
}
- case Serialize: {
- ast_t *value = Match(ast, Serialize)->value;
- type_t *t = get_type(env, value);
- return CORD_all("generic_serialize((", compile_declaration(t, "[1]"), "){", compile(env, value), "}, ", compile_type_info(env, t), ")");
- }
case Deserialize: {
ast_t *value = Match(ast, Deserialize)->value;
type_t *value_type = get_type(env, value);
diff --git a/typecheck.c b/typecheck.c
index fbee0d07..877d56ab 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -1323,7 +1323,6 @@ type_t *get_type(env_t *env, ast_t *ast)
}
case Moment: return Type(MomentType);
case Unknown: code_err(ast, "I can't figure out the type of: %W", ast);
- case Serialize: return Type(ArrayType, Type(ByteType));
case Deserialize: return parse_type_ast(env, Match(ast, Deserialize)->type);
}
#pragma GCC diagnostic pop