commit 7c3935d13613a88432a1ddb70ed2695d8ea7dc95
parent 5d3d1c7f53aeacff01a6f2dfc48b1346b4521f13
Author: Sebastian <sebastian@sebsite.pw>
Date: Fri, 11 Mar 2022 18:41:22 -0500
unit: remove fndecl_attrs
This is already provided by hare::ast.
Signed-off-by: Sebastian <sebastian@sebsite.pw>
Diffstat:
2 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/hare/unit/process.ha b/hare/unit/process.ha
@@ -79,7 +79,7 @@ fn process_func(
prototype = prototype,
body = body,
// TODO: We should make these enums inherited
- attrs = afndecl.attrs: fndecl_attrs,
+ attrs = afndecl.attrs: ast::fndecl_attrs,
},
};
};
diff --git a/hare/unit/unit.ha b/hare/unit/unit.ha
@@ -4,13 +4,6 @@ use hare::ast;
use hare::lex;
use hare::types;
-// Attributes applicable to a function declaration.
-export type fndecl_attrs = enum {
- NONE,
- FINI,
- INIT,
- TEST,
-};
// A function declaration.
export type decl_func = struct {
@@ -18,7 +11,7 @@ export type decl_func = struct {
ident: ast::ident,
prototype: const *types::_type,
body: nullable *expr,
- attrs: fndecl_attrs,
+ attrs: ast::fndecl_attrs,
};
// A declaration within a unit.