8 instantiations of Location
ILAssembler (8)
Actions\GrammarActions.Manifest.Assembly.cs (2)
188? new Location(new SourceSpan(0, 0), firstDocument) 189: new Location(new SourceSpan(0, 0), new SourceText(string.Empty, keyFilePath));
DocumentCompiler.cs (4)
44diagnostics.Add(new Diagnostic("Preprocessor", DiagnosticSeverity.Error, msg, new Location(new(start, length), sourceText))); 48diagnostics.Add(new Diagnostic("Preprocessor", DiagnosticSeverity.Error, msg, new Location(new(start, length), new SourceText("", source)))); 116_diagnostics.Add(new Diagnostic(DiagnosticIds.Parser, DiagnosticSeverity.Error, $"line {line}:{charPositionInLine} {msg}", new Location(span, sourceText))); 120_diagnostics.Add(new Diagnostic(DiagnosticIds.Parser, DiagnosticSeverity.Error, $"line {line}:{charPositionInLine} {msg}", new Location(span, new SourceText("", sourceName))));
Location.cs (1)
17return new Location(GetSourceSpan(token), source);
PseudoCustomAttributes.cs (1)
23private static readonly Location s_unknownLocation = new(new SourceSpan(0, 0), new SourceText("", ""));
35 references to Location
ILAssembler (35)
Actions\GrammarActions.Conversions.cs (5)
88var location = Location.From(context.Start, _documents); 136Location.From(token, _documents))); 139private void ReportError(string id, string message, Location location) 151Location.From(token, _documents)));
Actions\GrammarActions.CustomAttributes.Actions.cs (2)
174attribute.Location = Location.From(location, _documents); 201typedefAttribute.Location = Location.From(location, _documents);
Actions\GrammarActions.Debug.cs (1)
332state = new SourceLineState(Location.GetSourceName(token));
Actions\GrammarActions.Instructions.cs (3)
148_options.Optimize, Location.From(opcodeToken, _documents)); 163_options.Optimize, Location.From(opcodeToken, _documents)); 348method.Definition.MethodBody.Switch(labels, Location.From(builder.OpcodeToken, _documents));
Actions\GrammarActions.Literals.cs (2)
194Location.From(token, _documents))); 233Location.From(token, _documents)));
Actions\GrammarActions.Manifest.Assembly.cs (1)
187Location location = firstDocument is not null
Actions\GrammarActions.MethodBodies.ExceptionHandling.cs (2)
102Location location = Location.From(context.Start, _documents);
Actions\GrammarActions.MethodBodies.Locals.cs (1)
230Location.From(nameToken, _documents)));
Actions\GrammarActions.Types.Headers.cs (1)
186Location.From(location, _documents)));
Diagnostic.cs (1)
14public record Diagnostic(string Id, DiagnosticSeverity Severity, string Message, Location Location);
DocumentCompiler.cs (1)
113SourceSpan span = Location.GetSourceSpan(offendingSymbol);
EntityRegistry.cs (7)
2126public Location? Location { get; set; } 2320public readonly record struct LocalVariableRecord(string Name, int Slot, Location Location); 2326internal abstract record ExceptionRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd, Location Location) 2328internal sealed record CatchRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd, TypeEntity CatchType, Location Location) : ExceptionRegion(TryStart, TryEnd, HandlerStart, HandlerEnd, Location); 2329internal sealed record FinallyRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd, Location Location) : ExceptionRegion(TryStart, TryEnd, HandlerStart, HandlerEnd, Location); 2330internal sealed record FaultRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd, Location Location) : ExceptionRegion(TryStart, TryEnd, HandlerStart, HandlerEnd, Location); 2331internal sealed record FilterRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd, LabelHandle FilterStart, Location Location) : ExceptionRegion(TryStart, TryEnd, HandlerStart, HandlerEnd, Location);
Location.cs (1)
11internal static Location From(Antlr4.Runtime.IToken token, IReadOnlyDictionary<string, SourceText> sourceDocuments)
MethodBodyWriter.cs (5)
20private readonly record struct BranchFixup(Blob Operand, Label Target, int EndOffset, ILOpCode OpCode, Location Location); 158public void Branch(ILOpCode code, Label target, bool optimize, Location location) 174public void Branch(ILOpCode code, int distance, bool optimize, Location location) 186public void Switch(IReadOnlyList<(Label Label, int? Offset)> targets, Location location) 205private void WriteBranchOperand(ref BlobWriter writer, ILOpCode code, int distance, Location location)
PreprocessedTokenSource.cs (1)
341SourceSpan span = Location.GetSourceSpan(token);
PseudoCustomAttributes.cs (1)
23private static readonly Location s_unknownLocation = new(new SourceSpan(0, 0), new SourceText("", ""));