aboutsummaryrefslogtreecommitdiff
path: root/ast.h
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-08-22 14:02:48 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-08-22 14:02:48 -0400
commitad51b208b4924d04f1d6a804178a67994b4f9e59 (patch)
tree9ae29e0af02b7406a0cf07fdd8b0dd7fdac0aedf /ast.h
parent2055439be4f5053b9a4d631cefd8bb7c83a8e4e3 (diff)
Overhaul of import syntax. Now everything uses `use`: `use foo`, `use
./foo.tm`, `use <foo.h>`, `use libfoo.so`
Diffstat (limited to 'ast.h')
-rw-r--r--ast.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/ast.h b/ast.h
index c98ac674..1d295e58 100644
--- a/ast.h
+++ b/ast.h
@@ -122,7 +122,7 @@ typedef enum {
StructDef, EnumDef, LangDef,
Index, FieldAccess, Optional,
DocTest,
- Import, Use,
+ Use,
LinkerDirective,
InlineCCode,
} ast_e;
@@ -291,10 +291,8 @@ struct ast_s {
bool skip_source:1;
} DocTest;
struct {
- const char *path;
- } Import;
- struct {
const char *name;
+ enum { USE_LOCAL, USE_MODULE, USE_SHARED_OBJECT, USE_HEADER } what;
} Use;
struct {
const char *directive;