From 54a2a8e940018f8984e51e21fe94abf1ff0055fe Mon Sep 17 00:00:00 2001 From: Brad Lewis <22850972+BradLewis@users.noreply.github.com> Date: Sun, 14 Dec 2025 05:28:06 -0500 Subject: Add documentation for directives --- src/server/analysis.odin | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'src/server/analysis.odin') diff --git a/src/server/analysis.odin b/src/server/analysis.odin index 4fc69c4..2c7f4f4 100644 --- a/src/server/analysis.odin +++ b/src/server/analysis.odin @@ -1400,7 +1400,18 @@ resolve_call_directive :: proc(ast_context: ^AstContext, call: ^ast.Call_Expr) - ident.name = "int" return resolve_type_identifier(ast_context, ident^) case "load_directory": - return lookup("Load_Directory_File", indexer.runtime_package, call.pos.file) + pkg := new_type(ast.Ident, call.pos, call.end, ast_context.allocator) + pkg.name = "runtime" + field := new_type(ast.Ident, call.pos, call.end, ast_context.allocator) + field.name = "Load_Directory_File" + selector := new_type(ast.Selector_Expr, call.pos, call.end, ast_context.allocator) + selector.expr = pkg + selector.field = field + value := SymbolSliceValue{ + expr = selector + } + symbol := Symbol{name = "#load_directory", pkg = ast_context.current_package, value = value} + return symbol, true } return {}, false -- cgit v1.2.3