Skip to content

Commit 66e679a

Browse files
committed
Replace obsolete Loyc source position type
1 parent 9179d3c commit 66e679a

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Pixie.Loyc/PixieMessageSink.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ public PixieMessageSink(ILog log)
2525
/// <param name="log">The log to redirect messages to.</param>
2626
/// <param name="documentCache">
2727
/// The source document cache to use for translating
28-
/// <see cref="global::Loyc.Syntax.SourcePos"/> values
28+
/// <see cref="global::Loyc.Syntax.LineColumnFile"/> values
2929
/// to caret diagnostics.
3030
/// </param>
3131
public PixieMessageSink(ILog log, SourceDocumentCache documentCache)
@@ -114,12 +114,12 @@ private MarkupNode FormatContext(object context)
114114
{
115115
return FormatContext(((ILocation)context).Location);
116116
}
117-
else if (context is SourcePos)
117+
else if (context is LineColumnFile)
118118
{
119119
// Source positions are actually pretty tough to create
120120
// caret diagnostics for. We'll just try to index the source
121121
// document cache.
122-
var pos = (SourcePos)context;
122+
var pos = (LineColumnFile)context;
123123
SourceRegion region;
124124
if (TryIndexSourceDocumentCache(pos, out region))
125125
{
@@ -154,7 +154,7 @@ private MarkupNode FormatContext(object context)
154154
}
155155
}
156156

157-
private bool TryIndexSourceDocumentCache(SourcePos pos, out SourceRegion result)
157+
private bool TryIndexSourceDocumentCache(LineColumnFile pos, out SourceRegion result)
158158
{
159159
SourceDocument document;
160160
if (DocumentCache.TryGetDocument(pos.FileName, out document))

Pixie.Loyc/SourceDocumentCache.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ namespace Pixie.Loyc
88
/// A container for a set of source documents that can be addressed
99
/// by file name. This data structure is used by
1010
/// <see cref="Pixie.Loyc.PixieMessageSink"/> instances to translate
11-
/// <see cref="global::Loyc.Syntax.SourcePos"/> values to caret
11+
/// <see cref="global::Loyc.Syntax.LineColumnFile"/> values to caret
1212
/// diagnostics.
1313
/// </summary>
1414
public sealed class SourceDocumentCache
@@ -86,4 +86,4 @@ public void Add(SourceDocument document)
8686
}
8787
}
8888
}
89-
}
89+
}

0 commit comments

Comments
 (0)