aboutsummaryrefslogtreecommitdiff
path: root/src/parse
diff options
context:
space:
mode:
Diffstat (limited to 'src/parse')
-rw-r--r--src/parse/controlflow.c7
-rw-r--r--src/parse/controlflow.h1
-rw-r--r--src/parse/expressions.c6
-rw-r--r--src/parse/utils.c7
4 files changed, 6 insertions, 15 deletions
diff --git a/src/parse/controlflow.c b/src/parse/controlflow.c
index 1087e20e..74b3ea7a 100644
--- a/src/parse/controlflow.c
+++ b/src/parse/controlflow.c
@@ -79,13 +79,6 @@ ast_t *parse_pass(parse_ctx_t *ctx, const char *pos) {
return match_word(&pos, "pass") ? NewAST(ctx->file, start, pos, Pass) : NULL;
}
-ast_t *parse_defer(parse_ctx_t *ctx, const char *pos) {
- const char *start = pos;
- if (!match_word(&pos, "defer")) return NULL;
- ast_t *body = expect(ctx, start, &pos, parse_block, "I expected a block to be deferred here");
- return NewAST(ctx->file, start, pos, Defer, .body = body);
-}
-
ast_t *parse_skip(parse_ctx_t *ctx, const char *pos) {
const char *start = pos;
if (!match_word(&pos, "continue") && !match_word(&pos, "skip")) return NULL;
diff --git a/src/parse/controlflow.h b/src/parse/controlflow.h
index 2ef093d4..35a5a3f6 100644
--- a/src/parse/controlflow.h
+++ b/src/parse/controlflow.h
@@ -5,7 +5,6 @@
#include "context.h"
ast_t *parse_block(parse_ctx_t *ctx, const char *pos);
-ast_t *parse_defer(parse_ctx_t *ctx, const char *pos);
ast_t *parse_do(parse_ctx_t *ctx, const char *pos);
ast_t *parse_for(parse_ctx_t *ctx, const char *pos);
ast_t *parse_if(parse_ctx_t *ctx, const char *pos);
diff --git a/src/parse/expressions.c b/src/parse/expressions.c
index 3cb47669..d6578b9e 100644
--- a/src/parse/expressions.c
+++ b/src/parse/expressions.c
@@ -191,9 +191,9 @@ ast_t *parse_term_no_suffix(parse_ctx_t *ctx, const char *pos) {
|| (term = parse_bool(ctx, pos)) || (term = parse_text(ctx, pos)) || (term = parse_path(ctx, pos))
|| (term = parse_lambda(ctx, pos)) || (term = parse_parens(ctx, pos)) || (term = parse_table(ctx, pos))
|| (term = parse_deserialize(ctx, pos)) || (term = parse_var(ctx, pos)) || (term = parse_list(ctx, pos))
- || (term = parse_reduction(ctx, pos)) || (term = parse_pass(ctx, pos)) || (term = parse_defer(ctx, pos))
- || (term = parse_skip(ctx, pos)) || (term = parse_stop(ctx, pos)) || (term = parse_return(ctx, pos))
- || (term = parse_not(ctx, pos)) || (term = parse_inline_c(ctx, pos)));
+ || (term = parse_reduction(ctx, pos)) || (term = parse_pass(ctx, pos)) || (term = parse_skip(ctx, pos))
+ || (term = parse_stop(ctx, pos)) || (term = parse_return(ctx, pos)) || (term = parse_not(ctx, pos))
+ || (term = parse_inline_c(ctx, pos)));
return term;
}
diff --git a/src/parse/utils.c b/src/parse/utils.c
index 2048a3ff..b45e388e 100644
--- a/src/parse/utils.c
+++ b/src/parse/utils.c
@@ -12,10 +12,9 @@
#include "utils.h"
static const char *keywords[] = {
- "C_code", "_max_", "_min_", "and", "assert", "break", "continue", "defer", "deserialize", "do",
- "else", "enum", "extend", "for", "func", "if", "in", "lang", "mod", "mod1",
- "no", "none", "not", "or", "pass", "return", "skip", "skip", "stop", "struct",
- "then", "unless", "use", "when", "while", "xor", "yes",
+ "C_code", "_max_", "_min_", "and", "assert", "break", "continue", "deserialize", "do", "else", "enum", "extend",
+ "for", "func", "if", "in", "lang", "mod", "mod1", "no", "none", "not", "or", "pass",
+ "return", "skip", "skip", "stop", "struct", "then", "unless", "use", "when", "while", "xor", "yes",
};
CONSTFUNC bool is_keyword(const char *word) {