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("Parser", DiagnosticSeverity.Error, $"line {line}:{charPositionInLine} {msg}", new Location(span, sourceText))); 120_diagnostics.Add(new Diagnostic("Parser", DiagnosticSeverity.Error, $"line {line}:{charPositionInLine} {msg}", new Location(span, new SourceText("", sourceName))));
Location.cs (1)
20return new Location(GetSourceSpan(token), source);
PseudoCustomAttributes.cs (1)
23private static readonly Location s_unknownLocation = new(new SourceSpan(0, 0), new SourceText("", ""));
31 references to Location
ILAssembler (31)
Actions\GrammarActions.Conversions.cs (4)
80var location = Location.From(context.Start, _documents); 128Location.From(token, _documents))); 140Location.From(token, _documents)));
Actions\GrammarActions.CustomAttributes.Actions.cs (2)
174attribute.Location = Location.From(location, _documents); 201typedefAttribute.Location = Location.From(location, _documents);
Actions\GrammarActions.Instructions.cs (3)
147_options.Optimize, Location.From(opcodeToken, _documents)); 162_options.Optimize, Location.From(opcodeToken, _documents)); 328method.Definition.MethodBody.Switch(labels, Location.From(builder.OpcodeToken, _documents));
Actions\GrammarActions.Literals.cs (2)
177Location.From(token, _documents))); 216Location.From(token, _documents)));
Actions\GrammarActions.Manifest.Assembly.cs (1)
187Location location = firstDocument is not null
Actions\GrammarActions.MethodBodies.ExceptionHandling.cs (2)
109Location location = Location.From(context.Start, _documents);
Actions\GrammarActions.Types.Headers.cs (1)
177Location.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 (6)
2109public Location? Location { get; set; } 2263internal abstract record ExceptionRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd, Location Location) 2265internal sealed record CatchRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd, TypeEntity CatchType, Location Location) : ExceptionRegion(TryStart, TryEnd, HandlerStart, HandlerEnd, Location); 2266internal sealed record FinallyRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd, Location Location) : ExceptionRegion(TryStart, TryEnd, HandlerStart, HandlerEnd, Location); 2267internal sealed record FaultRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd, Location Location) : ExceptionRegion(TryStart, TryEnd, HandlerStart, HandlerEnd, Location); 2268internal 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("", ""));