7 instantiations of SourceText
ilasm (4)
Program.cs (4)
77documents.Add(new SourceText(File.ReadAllText(file), file)); 175return new SourceText(File.ReadAllText(path), path); 182return new SourceText(File.ReadAllText(fullPath), fullPath); 191return new SourceText(File.ReadAllText(fullPath), fullPath);
ILAssembler (3)
DocumentCompiler.cs (2)
54diagnostics.Add(new Diagnostic("Preprocessor", DiagnosticSeverity.Error, msg, new Location(new(start, length), new SourceText("", source)))); 114_diagnostics.Add(new Diagnostic("Parser", DiagnosticSeverity.Error, $"line {line}:{charPositionInLine} {msg}", new Location(span, new SourceText("", sourceName))));
GrammarVisitor.cs (1)
734: new Location(new SourceSpan(0, 0), new SourceText(string.Empty, keyFilePath));
18 references to SourceText
ilasm (2)
Program.cs (2)
74var documents = ImmutableArray.CreateBuilder<SourceText>(inputFiles.Length); 170SourceText LoadIncludedDocument(string path)
ILAssembler (16)
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) 37var includedDocument = includedDocumentLoader(path); 48if (loadedDocuments.TryGetValue(source, out var sourceText)) 96private readonly Dictionary<string, SourceText> _loadedDocuments; 98public ParserErrorListener(ImmutableArray<Diagnostic>.Builder diagnostics, Dictionary<string, SourceText> loadedDocuments) 108if (_loadedDocuments.TryGetValue(sourceName, out var sourceText))
GrammarVisitor.cs (3)
82private readonly IReadOnlyDictionary<string, SourceText> _documents; 107public GrammarVisitor(IReadOnlyDictionary<string, SourceText> documents, Options options, Func<string, byte[]> resourceLocator) 731var firstDoc = _documents.Values.FirstOrDefault();
Location.cs (2)
9public record Location(SourceSpan Span, SourceText Source) 11internal static Location From(Antlr4.Runtime.IToken token, IReadOnlyDictionary<string, SourceText> sourceDocuments)