9 instantiations of SourceText
ilasm (4)
Program.cs (4)
86documents.Add(new SourceText(File.ReadAllText(file), file)); 182return new SourceText(File.ReadAllText(path), path); 189return new SourceText(File.ReadAllText(fullPath), fullPath); 198return new SourceText(File.ReadAllText(fullPath), fullPath);
ILAssembler (5)
Actions\GrammarActions.Manifest.Assembly.cs (1)
189: new Location(new SourceSpan(0, 0), new SourceText(string.Empty, keyFilePath));
DocumentCompiler.cs (2)
48diagnostics.Add(new Diagnostic("Preprocessor", DiagnosticSeverity.Error, msg, new Location(new(start, length), new SourceText("", source)))); 120_diagnostics.Add(new Diagnostic("Parser", DiagnosticSeverity.Error, $"line {line}:{charPositionInLine} {msg}", new Location(span, new SourceText("", sourceName))));
Location.cs (1)
19: new SourceText(string.Empty, sourceName);
PseudoCustomAttributes.cs (1)
23private static readonly Location s_unknownLocation = new(new SourceSpan(0, 0), new SourceText("", ""));
20 references to SourceText
ilasm (2)
Program.cs (2)
83var documents = ImmutableArray.CreateBuilder<SourceText>(inputFiles.Length); 177SourceText LoadIncludedDocument(string path)
ILAssembler (18)
Actions\GrammarActions.Conversions.cs (2)
30private readonly IReadOnlyDictionary<string, SourceText> _documents; 53internal GrammarActions(IReadOnlyDictionary<string, SourceText> documents, Options options, Func<string, byte[]?> resourceLocator)
Actions\GrammarActions.Manifest.Assembly.cs (1)
186SourceText? firstDocument = _documents.Values.FirstOrDefault();
DocumentCompiler.cs (11)
13public (ImmutableArray<Diagnostic>, CompilationResult?) Compile(SourceText document, Func<string, SourceText> includedDocumentLoader, Func<string, byte[]?> resourceLocator, Options options) 18public (ImmutableArray<Diagnostic>, CompilationResult?) Compile(ImmutableArray<SourceText> documents, Func<string, SourceText> includedDocumentLoader, Func<string, byte[]?> resourceLocator, Options options) 20Dictionary<string, SourceText> loadedDocuments = new(); 26foreach (var document in documents) 34SourceText includedDocument = includedDocumentLoader(path); 42if (loadedDocuments.TryGetValue(source, out var sourceText)) 93private readonly Dictionary<string, SourceText> _loadedDocuments; 98Dictionary<string, SourceText> loadedDocuments, 114if (_loadedDocuments.TryGetValue(sourceName, out var sourceText))
Location.cs (4)
9public record Location(SourceSpan Span, SourceText Source) 11internal static Location From(Antlr4.Runtime.IToken token, IReadOnlyDictionary<string, SourceText> sourceDocuments) 17SourceText source = sourceDocuments.TryGetValue(sourceName, out SourceText? sourceDocument)