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)
44
diagnostics.Add(new Diagnostic("Preprocessor", DiagnosticSeverity.Error, msg, new
Location
(new(start, length), sourceText)));
48
diagnostics.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)
20
return new
Location
(GetSourceSpan(token), source);
PseudoCustomAttributes.cs (1)
23
private static readonly Location s_unknownLocation =
new
(new SourceSpan(0, 0), new SourceText("", ""));
31 references to Location
ILAssembler (31)
Actions\GrammarActions.Conversions.cs (4)
80
var
location =
Location
.From(context.Start, _documents);
128
Location
.From(token, _documents)));
140
Location
.From(token, _documents)));
Actions\GrammarActions.CustomAttributes.Actions.cs (2)
174
attribute.Location =
Location
.From(location, _documents);
201
typedefAttribute.Location =
Location
.From(location, _documents);
Actions\GrammarActions.Instructions.cs (3)
147
_options.Optimize,
Location
.From(opcodeToken, _documents));
162
_options.Optimize,
Location
.From(opcodeToken, _documents));
328
method.Definition.MethodBody.Switch(labels,
Location
.From(builder.OpcodeToken, _documents));
Actions\GrammarActions.Literals.cs (2)
177
Location
.From(token, _documents)));
216
Location
.From(token, _documents)));
Actions\GrammarActions.Manifest.Assembly.cs (1)
187
Location
location = firstDocument is not null
Actions\GrammarActions.MethodBodies.ExceptionHandling.cs (2)
109
Location
location =
Location
.From(context.Start, _documents);
Actions\GrammarActions.Types.Headers.cs (1)
177
Location
.From(location, _documents)));
Diagnostic.cs (1)
14
public record Diagnostic(string Id, DiagnosticSeverity Severity, string Message,
Location
Location);
DocumentCompiler.cs (1)
113
SourceSpan span =
Location
.GetSourceSpan(offendingSymbol);
EntityRegistry.cs (6)
2109
public
Location
? Location { get; set; }
2263
internal abstract record ExceptionRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd,
Location
Location)
2265
internal sealed record CatchRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd, TypeEntity CatchType,
Location
Location) : ExceptionRegion(TryStart, TryEnd, HandlerStart, HandlerEnd, Location);
2266
internal sealed record FinallyRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd,
Location
Location) : ExceptionRegion(TryStart, TryEnd, HandlerStart, HandlerEnd, Location);
2267
internal sealed record FaultRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd,
Location
Location) : ExceptionRegion(TryStart, TryEnd, HandlerStart, HandlerEnd, Location);
2268
internal sealed record FilterRegion(LabelHandle TryStart, LabelHandle TryEnd, LabelHandle HandlerStart, LabelHandle HandlerEnd, LabelHandle FilterStart,
Location
Location) : ExceptionRegion(TryStart, TryEnd, HandlerStart, HandlerEnd, Location);
Location.cs (1)
11
internal static
Location
From(Antlr4.Runtime.IToken token, IReadOnlyDictionary<string, SourceText> sourceDocuments)
MethodBodyWriter.cs (5)
20
private readonly record struct BranchFixup(Blob Operand, Label Target, int EndOffset, ILOpCode OpCode,
Location
Location);
158
public void Branch(ILOpCode code, Label target, bool optimize,
Location
location)
174
public void Branch(ILOpCode code, int distance, bool optimize,
Location
location)
186
public void Switch(IReadOnlyList<(Label Label, int? Offset)> targets,
Location
location)
205
private void WriteBranchOperand(ref BlobWriter writer, ILOpCode code, int distance,
Location
location)
PreprocessedTokenSource.cs (1)
341
SourceSpan span =
Location
.GetSourceSpan(token);
PseudoCustomAttributes.cs (1)
23
private static readonly
Location
s_unknownLocation = new(new SourceSpan(0, 0), new SourceText("", ""));