aboutsummaryrefslogtreecommitdiff
path: root/src/parse/suffixes.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-08-25 01:07:14 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-08-25 01:07:14 -0400
commitbbcc85eec5ccccd7cd7573f15510ceccfe42cc0d (patch)
treec4a0f190fb79e07a02a774f5ffb8ee4e89d24fc1 /src/parse/suffixes.h
parent47d38fb5ac183180edd297830261cedd8afee2d3 (diff)
Move suffix rules into their own file
Diffstat (limited to 'src/parse/suffixes.h')
-rw-r--r--src/parse/suffixes.h14
1 files changed, 14 insertions, 0 deletions
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);