Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions src/Compilers/CSharp/Portable/Parser/AbstractLexer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,6 @@ protected void AddError(int position, int width, ErrorCode code, params object[]
this.AddError(this.MakeError(position, width, code, args));
}

protected void AddError(int position, int width, XmlParseErrorCode code, params object[] args)
{
this.AddError(this.MakeError(position, width, code, args));
}

protected void AddError(ErrorCode code)
{
this.AddError(MakeError(code));
Expand Down Expand Up @@ -126,12 +121,6 @@ protected SyntaxDiagnosticInfo MakeError(int position, int width, ErrorCode code
return new SyntaxDiagnosticInfo(offset, width, code, args);
}

protected XmlSyntaxDiagnosticInfo MakeError(int position, int width, XmlParseErrorCode code, params object[] args)
{
int offset = GetLexemeOffsetFromPosition(position);
return new XmlSyntaxDiagnosticInfo(offset, width, code, args);
}

private int GetLexemeOffsetFromPosition(int position)
{
return position >= LexemeStartPosition ? position - LexemeStartPosition : position;
Expand Down
8 changes: 0 additions & 8 deletions src/Compilers/CSharp/Portable/Parser/SyntaxParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -838,14 +838,6 @@ protected TNode AddErrorToLastToken<TNode>(TNode node, ErrorCode code) where TNo
return WithAdditionalDiagnostics(node, MakeError(offset, width, code));
}

protected TNode AddErrorToLastToken<TNode>(TNode node, ErrorCode code, params object[] args) where TNode : CSharpSyntaxNode
{
int offset;
int width;
GetOffsetAndWidthForLastToken(node, out offset, out width);
return WithAdditionalDiagnostics(node, MakeError(offset, width, code, args));
}

private static void GetOffsetAndWidthForLastToken<TNode>(TNode node, out int offset, out int width) where TNode : CSharpSyntaxNode
{
var lastToken = node.GetLastNonmissingToken();
Expand Down