23 references to GetLeadingTriviaWidth
Microsoft.CodeAnalysis.CSharp (23)
Parser\DirectiveParser.cs (2)
316
int triviaOffset = eod.
GetLeadingTriviaWidth
() - triviaWidth;
388
(line.IsMissing || line.GetTrailingTriviaWidth() > 0 || this.CurrentToken.
GetLeadingTriviaWidth
() > 0)) //require separation between line number and file name
Parser\DocumentationCommentParser.cs (4)
690
int colonLeadingWidth = colon.
GetLeadingTriviaWidth
();
704
int localNameLeadingWidth = id.
GetLeadingTriviaWidth
();
1015
if (operatorToken.Kind == SyntaxKind.GreaterThanToken && operatorToken.GetTrailingTriviaWidth() == 0 && CurrentToken.
GetLeadingTriviaWidth
() == 0)
1021
if (operatorToken2.GetTrailingTriviaWidth() == 0 && CurrentToken.
GetLeadingTriviaWidth
() == 0 &&
Parser\LanguageParser.cs (10)
2926
type.FullWidth + misplacedModifier.
GetLeadingTriviaWidth
(),
2967
incompleteMember.FullWidth + this.CurrentToken.
GetLeadingTriviaWidth
(),
3769
separator = WithAdditionalDiagnostics(separator, GetExpectedTokenError(SyntaxKind.DotToken, separator.Kind, separator.
GetLeadingTriviaWidth
(), separator.Width));
3835
opTokenErrorOffset = opToken.
GetLeadingTriviaWidth
();
3867
opTokenErrorOffset = opToken.
GetLeadingTriviaWidth
();
4730
=> token1.GetTrailingTriviaWidth() == 0 && token2.
GetLeadingTriviaWidth
() == 0;
6511
separator = WithAdditionalDiagnostics(separator, GetExpectedTokenError(SyntaxKind.DotToken, separator.Kind, separator.
GetLeadingTriviaWidth
(), separator.Width));
6693
separator = WithAdditionalDiagnostics(separator, GetExpectedTokenError(SyntaxKind.DotToken, separator.Kind, separator.
GetLeadingTriviaWidth
(), separator.Width));
11400
offset: dotDotToken.
GetLeadingTriviaWidth
(),
13691
name = WithAdditionalDiagnostics(name, this.GetExpectedTokenError(SyntaxKind.IdentifierToken, name.ContextualKind, name.
GetLeadingTriviaWidth
(), name.Width));
Parser\SyntaxParser.cs (7)
624
token = WithAdditionalDiagnostics(token, MakeError(token.
GetLeadingTriviaWidth
(), token.Width, errorCode, args));
737
offset = ct.
GetLeadingTriviaWidth
();
789
offset = token.
GetLeadingTriviaWidth
(); // Should always be zero, but at least we'll do something sensible if it's not.
835
return WithAdditionalDiagnostics(node, MakeError(firstToken.
GetLeadingTriviaWidth
(), firstToken.Width, code));
841
return WithAdditionalDiagnostics(node, MakeError(firstToken.
GetLeadingTriviaWidth
(), firstToken.Width, code, args));
868
offset += lastToken.
GetLeadingTriviaWidth
(); //advance past last token leading trivia - now at start of last token
960
int leadingWidth = token.
GetLeadingTriviaWidth
();