From bbcc85eec5ccccd7cd7573f15510ceccfe42cc0d Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Mon, 25 Aug 2025 01:07:14 -0400 Subject: Move suffix rules into their own file --- src/parse/suffixes.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 src/parse/suffixes.h (limited to 'src/parse/suffixes.h') diff --git a/src/parse/suffixes.h b/src/parse/suffixes.h new file mode 100644 index 00000000..da2f23a2 --- /dev/null +++ b/src/parse/suffixes.h @@ -0,0 +1,14 @@ +// Logic for parsing various suffixes that can go after an expression +#pragma once + +#include "../ast.h" +#include "context.h" + +ast_t *parse_comprehension_suffix(parse_ctx_t *ctx, ast_t *expr); +ast_t *parse_field_suffix(parse_ctx_t *ctx, ast_t *lhs); +ast_t *parse_fncall_suffix(parse_ctx_t *ctx, ast_t *fn); +ast_t *parse_index_suffix(parse_ctx_t *ctx, ast_t *lhs); +ast_t *parse_method_call_suffix(parse_ctx_t *ctx, ast_t *self); +ast_t *parse_non_optional_suffix(parse_ctx_t *ctx, ast_t *lhs); +ast_t *parse_optional_conditional_suffix(parse_ctx_t *ctx, ast_t *stmt); +ast_t *parse_optional_suffix(parse_ctx_t *ctx, ast_t *lhs); -- cgit v1.2.3