layout
This commit is contained in:
@@ -24,6 +24,8 @@ pub const Document = struct {
|
||||
root: ?*sx.ast.Node,
|
||||
/// Sema results for this file (references are relative to this source).
|
||||
sema: ?sx.sema.SemaResult,
|
||||
/// Last successful sema (preserved across parse failures for completions).
|
||||
last_good_sema: ?sx.sema.SemaResult = null,
|
||||
/// Import declarations parsed from this file.
|
||||
imports: []const Import,
|
||||
|
||||
@@ -199,6 +201,9 @@ pub const DocumentStore = struct {
|
||||
|
||||
// Run sema on this file's own AST
|
||||
doc.sema = analyzer.analyze(root) catch null;
|
||||
if (doc.sema != null) {
|
||||
doc.last_good_sema = doc.sema;
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get(self: *const DocumentStore, path: []const u8) ?*Document {
|
||||
|
||||
Reference in New Issue
Block a user