diff --git a/ast.c b/ast.c
index 0d2d6e5..5ac5a32 100644
--- a/ast.c
+++ b/ast.c
@@ -157,7 +157,6 @@ CORD ast_to_xml(ast_t *ast)
T(NonOptional, "%r", ast_to_xml(data.value))
T(DocTest, "%r", optional_tagged("expression", data.expr), xml_escape(data.output))
T(Use, "", xml_escape(data.path))
- T(LinkerDirective, "%r", xml_escape(data.directive))
T(InlineCCode, "%r", xml_escape(data.code))
default: return "???";
#undef T
diff --git a/ast.h b/ast.h
index 7ff6f53..a186f57 100644
--- a/ast.h
+++ b/ast.h
@@ -129,7 +129,6 @@ typedef enum {
Index, FieldAccess, Optional, NonOptional,
DocTest,
Use,
- LinkerDirective,
InlineCCode,
} ast_e;
@@ -300,9 +299,6 @@ struct ast_s {
const char *path;
enum { USE_LOCAL, USE_MODULE, USE_SHARED_OBJECT, USE_HEADER } what;
} Use;
- struct {
- const char *directive;
- } LinkerDirective;
struct {
CORD code;
struct type_s *type;
diff --git a/compile.c b/compile.c
index 4ffdb0a..d769bcb 100644
--- a/compile.c
+++ b/compile.c
@@ -3243,7 +3243,6 @@ CORD compile(env_t *env, ast_t *ast)
}
case Use: code_err(ast, "Compiling 'use' as expression!");
case Defer: code_err(ast, "Compiling 'defer' as expression!");
- case LinkerDirective: code_err(ast, "Linker directives are not supported yet");
case Extern: code_err(ast, "Externs are not supported as expressions");
case TableEntry: code_err(ast, "Table entries should not be compiled directly");
case Declare: case Assign: case UpdateAssign: case For: case While: case StructDef: case LangDef:
diff --git a/parse.c b/parse.c
index d473942..b72df36 100644
--- a/parse.c
+++ b/parse.c
@@ -98,7 +98,6 @@ static PARSER(parse_func_def);
static PARSER(parse_if);
static PARSER(parse_inline_c);
static PARSER(parse_lang_def);
-static PARSER(parse_linker);
static PARSER(parse_namespace);
static PARSER(parse_path);
static PARSER(parse_say);
@@ -1916,7 +1915,6 @@ PARSER(parse_namespace) {
||(stmt=optional(ctx, &pos, parse_lang_def))
||(stmt=optional(ctx, &pos, parse_func_def))
||(stmt=optional(ctx, &pos, parse_use))
- ||(stmt=optional(ctx, &pos, parse_linker))
||(stmt=optional(ctx, &pos, parse_extern))
||(stmt=optional(ctx, &pos, parse_inline_c))
||(stmt=optional(ctx, &pos, parse_declaration)))
@@ -1952,7 +1950,6 @@ PARSER(parse_file_body) {
||(stmt=optional(ctx, &pos, parse_lang_def))
||(stmt=optional(ctx, &pos, parse_func_def))
||(stmt=optional(ctx, &pos, parse_use))
- ||(stmt=optional(ctx, &pos, parse_linker))
||(stmt=optional(ctx, &pos, parse_extern))
||(stmt=optional(ctx, &pos, parse_inline_c))
||(stmt=optional(ctx, &pos, parse_top_declaration)))
@@ -2343,16 +2340,6 @@ PARSER(parse_use) {
return NewAST(ctx->file, start, pos, Use, .path=name, .what=what);
}
-PARSER(parse_linker) {
- const char *start = pos;
- if (!match_word(&pos, "!link")) return NULL;
- spaces(&pos);
- size_t len = strcspn(pos, "\r\n");
- const char *directive = GC_strndup(pos, len);
- pos += len;
- return NewAST(ctx->file, start, pos, LinkerDirective, .directive=directive);
-}
-
ast_t *parse_file(const char *path, jmp_buf *on_err) {
const char *resolved = resolve_path(path, ".", ".");
if (!resolved)
diff --git a/typecheck.c b/typecheck.c
index 576007a..8f1e5e8 100644
--- a/typecheck.c
+++ b/typecheck.c
@@ -875,7 +875,7 @@ type_t *get_type(env_t *env, ast_t *ast)
case Extern: {
return parse_type_ast(env, Match(ast, Extern)->type);
}
- case Declare: case Assign: case DocTest: case LinkerDirective: {
+ case Declare: case Assign: case DocTest: {
return Type(VoidType);
}
case Use: {