aboutsummaryrefslogtreecommitdiff
path: root/typecheck.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-08 17:17:15 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-08 17:17:15 -0400
commitaeed1992e94c5ab6a5104a06a921101fbe8f40ed (patch)
tree8ba6dc531acefa0eedd330224f16f750496e8dbe /typecheck.h
parentcf9d5b1619b9e5e886d2754f167046ff77d36abf (diff)
Fix nearly every GCC warning and add __attribute__((pure/const)) where
appropriate
Diffstat (limited to 'typecheck.h')
-rw-r--r--typecheck.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/typecheck.h b/typecheck.h
index bca21ba8..d328f8b5 100644
--- a/typecheck.h
+++ b/typecheck.h
@@ -15,16 +15,16 @@ type_t *parse_type_ast(env_t *env, type_ast_t *ast);
type_t *get_type(env_t *env, ast_t *ast);
void prebind_statement(env_t *env, ast_t *statement);
void bind_statement(env_t *env, ast_t *statement);
-type_t *get_math_type(env_t *env, ast_t *ast, type_t *lhs_t, type_t *rhs_t);
-bool is_discardable(env_t *env, ast_t *ast);
+PUREFUNC type_t *get_math_type(env_t *env, ast_t *ast, type_t *lhs_t, type_t *rhs_t);
+PUREFUNC bool is_discardable(env_t *env, ast_t *ast);
type_t *get_file_type(env_t *env, const char *path);
type_t *get_function_def_type(env_t *env, ast_t *ast);
type_t *get_arg_type(env_t *env, arg_t *arg);
type_t *get_arg_ast_type(env_t *env, arg_ast_t *arg);
type_t *get_clause_type(env_t *env, type_t *subject_t, when_clause_t *clause);
-bool can_be_mutated(env_t *env, ast_t *ast);
+PUREFUNC bool can_be_mutated(env_t *env, ast_t *ast);
type_t *parse_type_string(env_t *env, const char *str);
type_t *get_method_type(env_t *env, ast_t *self, const char *name);
-bool is_constant(env_t *env, ast_t *ast);
+PUREFUNC bool is_constant(env_t *env, ast_t *ast);
// vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0