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