aboutsummaryrefslogtreecommitdiff
path: root/src/ast.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-09-06 14:34:38 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-09-06 14:34:38 -0400
commitcdb326a6e74e80bea9bffbeaaff1c5d1f4c9e733 (patch)
treeebb0cda65aae134746acd9dbe6e9b919284b9a4c /src/ast.h
parentaa15f0f78214cefa9fabace61c119e01812a3050 (diff)
Code cleanup
Diffstat (limited to 'src/ast.h')
-rw-r--r--src/ast.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ast.h b/src/ast.h
index 02c5ad74..7396555e 100644
--- a/src/ast.h
+++ b/src/ast.h
@@ -481,6 +481,13 @@ struct ast_s {
extern const int op_tightness[NUM_AST_TAGS];
+typedef struct {
+ const char *method_name;
+ const char *operator;
+} binop_info_t;
+
+extern const binop_info_t binop_info[NUM_AST_TAGS];
+
OptionalText_t ast_source(ast_t *ast);
Text_t ast_to_sexp(ast_t *ast);
@@ -490,7 +497,5 @@ Text_t type_ast_to_sexp(type_ast_t *ast);
PUREFUNC bool is_idempotent(ast_t *ast);
void visit_topologically(ast_list_t *ast, Closure_t fn);
CONSTFUNC bool is_update_assignment(ast_t *ast);
-CONSTFUNC const char *binop_method_name(ast_e tag);
-CONSTFUNC const char *binop_operator(ast_e tag);
CONSTFUNC ast_e binop_tag(ast_e tag);
CONSTFUNC bool is_binary_operation(ast_t *ast);