strings
This commit is contained in:
@@ -23,6 +23,8 @@ pub const Symbol = struct {
|
||||
ty: ?Type,
|
||||
def_span: Span,
|
||||
scope_depth: u32,
|
||||
/// null = defined in the current file. Non-null = absolute path of the origin file.
|
||||
origin: ?[]const u8 = null,
|
||||
};
|
||||
|
||||
pub const Reference = struct {
|
||||
@@ -521,6 +523,11 @@ pub const Analyzer = struct {
|
||||
});
|
||||
}
|
||||
|
||||
/// Pre-register an imported symbol so references in this file can resolve to it.
|
||||
pub fn preRegisterSymbol(self: *Analyzer, sym: Symbol) !void {
|
||||
try self.symbols.append(self.allocator, sym);
|
||||
}
|
||||
|
||||
fn resolveIdentifier(self: *Analyzer, name: []const u8, span: Span) !void {
|
||||
// Search backwards to find the most recent declaration with this name
|
||||
// that is at or above the current scope depth.
|
||||
|
||||
Reference in New Issue
Block a user