diff options
| author | Daniel Gavin <danielgavin5@hotmail.com> | 2022-03-04 19:22:33 +0100 |
|---|---|---|
| committer | Daniel Gavin <danielgavin5@hotmail.com> | 2022-03-04 19:22:33 +0100 |
| commit | 2d9f5709d74992e0cd485099a5a8cdf12178e80d (patch) | |
| tree | aebd707471ee0d6a62334bfd69f5681299f692cb /src/analysis | |
| parent | 75ab88b2c81c164b851c4e064f4da1c11b2a5679 (diff) | |
Add support for builtin symbols.
Diffstat (limited to 'src/analysis')
| -rw-r--r-- | src/analysis/analysis.odin | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/analysis/analysis.odin b/src/analysis/analysis.odin index 400bde6..b7be73c 100644 --- a/src/analysis/analysis.odin +++ b/src/analysis/analysis.odin @@ -1346,6 +1346,9 @@ resolve_type_identifier :: proc(ast_context: ^AstContext, node: ast.Ident) -> (i //If we are resolving a symbol that is in the document package, then we'll check the builtin packages. if ast_context.current_package == ast_context.document_package { + if symbol, ok := index.lookup(node.name, "$builtin"); ok { + return resolve_symbol_return(ast_context, symbol) + } for built in index.indexer.builtin_packages { if symbol, ok := index.lookup(node.name, built); ok { return resolve_symbol_return(ast_context, symbol) |