aboutsummaryrefslogtreecommitdiff
path: root/include/cmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/cmd.h')
-rw-r--r--include/cmd.h66
1 files changed, 0 insertions, 66 deletions
diff --git a/include/cmd.h b/include/cmd.h
deleted file mode 100644
index 2cf69b4..0000000
--- a/include/cmd.h
+++ /dev/null
@@ -1,66 +0,0 @@
-#ifndef CERC_CMD_H
-#define CERC_CMD_H
-#include "type.h"
-
-struct ast_return {
- struct ast_expr *value;
-};
-
-struct ast_break {
- const char *label;
- struct ast_expr *value;
-};
-
-struct ast_declaration {
- bool mut;
- const char *name;
- struct ast_expr *value;
-};
-
-enum statement {
- STM_RETURN,
- STM_BREAK,
- STM_CONTINUE,
- STM_DECL,
- STM_DEFER,
-};
-
-struct ast_statement {
- enum statement action;
- union {
- struct ast_return ret;
- struct ast_break brk;
- struct ast_declaration decl;
- struct assign_e *assign;
- struct call_e *call;
- } stmt;
-};
-
-struct ast_func {
- bool exported;
- const char *name;
- struct type *ret;
- struct ast_param *params;
- int paramsz, paramlen;
- struct ast_block *block;
-};
-struct ast_block {
- const char *label;
- struct ast_cmd *cmds;
- int cmdsz, cmdlen;
-};
-
-enum command {
- CMD_BLOCK,
- CMD_STATEMENT,
-};
-
-struct ast_cmd {
- enum command kind;
- union {
- struct ast_block blk;
- struct ast_statement stmt;
- } cmd;
-};
-
-#endif