diff options
| author | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-12-14 05:28:06 -0500 |
|---|---|---|
| committer | Brad Lewis <22850972+BradLewis@users.noreply.github.com> | 2025-12-14 05:29:27 -0500 |
| commit | 54a2a8e940018f8984e51e21fe94abf1ff0055fe (patch) | |
| tree | edcdfe7cbf58dfacd96311cd4bccaab196f0aa0b /src/server/analysis.odin | |
| parent | 70efaf21cac9358b1b50e194e3401b07901b8f47 (diff) | |
Add documentation for directives
Diffstat (limited to 'src/server/analysis.odin')
| -rw-r--r-- | src/server/analysis.odin | 13 |
1 files changed, 12 insertions, 1 deletions
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 |