70 references to IsNewLine
Microsoft.CodeAnalysis.CSharp (45)
Binder\Binder_InterpolatedString.cs (1)
131else if (SyntaxFacts.IsWhitespace(lastChar = text[text.Length - 1]) || SyntaxFacts.IsNewLine(lastChar))
Parser\LanguageParser_InterpolatedString.cs (3)
195var isBlankLine = (currentIndex == text.Length && isLast) || (currentIndex < text.Length && SyntaxFacts.IsNewLine(text[currentIndex])); 284if (openBracePosition > 0 && SyntaxFacts.IsNewLine(originalText[openBracePosition - 1])) 337if (!SyntaxFacts.IsNewLine(ch))
Parser\Lexer.cs (25)
2293else if (SyntaxFacts.IsNewLine(ch)) 2420if (position == 0 || SyntaxFacts.IsNewLine(text[position - 1])) 2519while (SyntaxFacts.IsNewLine(this.TextWindow.PeekChar())) 2535if (ch == SlidingTextWindow.InvalidCharacter || SyntaxFacts.IsNewLine(ch)) 2599while (!SyntaxFacts.IsNewLine(ch = TextWindow.PeekChar()) && 2628if (SyntaxFacts.IsNewLine(ch)) 2824if (SyntaxFacts.IsNewLine(ch)) 2854if (SyntaxFacts.IsNewLine(ch)) 3013if (!isEscaped && SyntaxFacts.IsNewLine(character)) 3118if (SyntaxFacts.IsNewLine(ch)) 3221if (SyntaxFacts.IsNewLine(ch)) 3400if (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.IsNewLine(ch)) 3510if (SyntaxFacts.IsNewLine(ch)) 3634else if (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.IsNewLine(ch)) 3783if (SyntaxFacts.IsNewLine(ch)) 3849if (SyntaxFacts.IsNewLine(ch)) 4021if (SyntaxFacts.IsNewLine(consumedChar)) 4386if (SyntaxFacts.IsNewLine(ch)) 4440if (SyntaxFacts.IsNewLine(ch)) 4516if (SyntaxFacts.IsNewLine(ch)) 4570if (SyntaxFacts.IsNewLine(ch)) 4639if (SyntaxFacts.IsNewLine(ch)) 4694if (SyntaxFacts.IsNewLine(ch)) 4847&& (SyntaxFacts.IsWhitespace(ch) || SyntaxFacts.IsNewLine(ch))) 4900if (SyntaxFacts.IsNewLine(ch))
Parser\Lexer_RawStringLiteral.cs (8)
68if (SyntaxFacts.IsNewLine(TextWindow.PeekChar())) 135if (SyntaxFacts.IsNewLine(currentChar)) 197Debug.Assert(SyntaxFacts.IsNewLine(TextWindow.PeekChar())); 224Debug.Assert(SyntaxFacts.IsNewLine(TextWindow.PeekChar())); 289if (SyntaxFacts.IsNewLine(currentChar)) 317Debug.Assert(SyntaxFacts.IsNewLine(TextWindow.PeekChar())); 341var isBlankLine = SyntaxFacts.IsNewLine(TextWindow.PeekChar()); 382if (SyntaxFacts.IsNewLine(currentChar))
Parser\Lexer_StringLiteral.cs (4)
57else if (SyntaxFacts.IsNewLine(ch) || 356(!allowNewline && SyntaxFacts.IsNewLine(ch)) || 481if (SyntaxFacts.IsNewLine(window.PeekChar())) 722if (SyntaxFacts.IsNewLine(_lexer.TextWindow.PeekChar()))
Parser\SlidingTextWindow.cs (2)
290Debug.Assert(SyntaxFacts.IsNewLine(this.PeekChar())); 296Debug.Assert(SyntaxFacts.IsNewLine(currentChar));
SymbolDisplay\ObjectDisplay.cs (1)
302if (SyntaxFacts.IsNewLine(c))
Syntax\SyntaxNormalizer.cs (1)
1237return text.Length > 0 && SyntaxFacts.IsNewLine(text.Last());
Microsoft.CodeAnalysis.CSharp.CodeStyle (4)
CSharpTriviaFormatter.cs (1)
47=> SyntaxFacts.IsNewLine(ch);
ElasticTriviaFormattingRule.cs (1)
479=> triviaList.Sum(t => t.ToFullString().Replace("\r\n", "\r").Cast<char>().Count(c => SyntaxFacts.IsNewLine(c)));
TriviaDataFactory.CodeShapeAnalyzer.cs (1)
314if (!string.IsNullOrEmpty(triviaString) && SyntaxFacts.IsNewLine(triviaString.Last()))
TriviaDataFactory.cs (1)
27=> SyntaxFacts.IsWhitespace(c) || SyntaxFacts.IsNewLine(c);
Microsoft.CodeAnalysis.CSharp.CodeStyle.Fixes (2)
ArrowExpressionClausePlacementCodeFixProvider.cs (1)
92if (end < text.Length && SyntaxFacts.IsNewLine(text[end]))
ConditionalExpressionPlacementCodeFixProvider.cs (1)
94if (end < text.Length && SyntaxFacts.IsNewLine(text[end]))
Microsoft.CodeAnalysis.CSharp.EditorFeatures (5)
BlockCommentEditing\BlockCommentEditingCommandHandler.cs (1)
90while (end < snapshot.Length && SyntaxFacts.IsWhitespace(end.GetChar()) && !SyntaxFacts.IsNewLine(end.GetChar()))
StringCopyPaste\StringCopyPasteHelpers.cs (1)
565if (SyntaxFacts.IsNewLine(text[i]))
StringCopyPaste\StringInfo.cs (2)
134Contract.ThrowIfFalse(SyntaxFacts.IsNewLine(text[rawStart])); 149Contract.ThrowIfFalse(SyntaxFacts.IsNewLine(text[rawEnd - 1]));
StringCopyPaste\UnknownSourcePasteProcessor.cs (1)
298else if (!lastChange && lineWithoutLeadingWhitespace.Length > 0 && SyntaxFacts.IsNewLine(lineWithoutLeadingWhitespace[0]))
Microsoft.CodeAnalysis.CSharp.ExpressionEvaluator.ResultProvider.UnitTests (1)
ObjectDisplay.cs (1)
302if (SyntaxFacts.IsNewLine(c))
Microsoft.CodeAnalysis.CSharp.Features (5)
ArrowExpressionClausePlacementCodeFixProvider.cs (1)
92if (end < text.Length && SyntaxFacts.IsNewLine(text[end]))
ConditionalExpressionPlacementCodeFixProvider.cs (1)
94if (end < text.Length && SyntaxFacts.IsNewLine(text[end]))
ConvertToRawString\ConvertToRawStringHelpers.cs (1)
35=> ch.Rune.Utf16SequenceLength == 1 && SyntaxFacts.IsNewLine((char)ch.Value);
MetadataAsSource\FormattingRule.cs (1)
66=> SyntaxFacts.IsNewLine(c);
Structure\Providers\DisabledTextTriviaStructureProvider.cs (1)
73endPos >= 1 && SyntaxFacts.IsNewLine(text[endPos - 1]) ? endPos - 1 : endPos;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (3)
LexicalAndXml\RawStringLiteralLexingTests.cs (1)
246if (charValue == '"' || SyntaxFacts.IsNewLine(charValue))
LexicalAndXml\XmlDocCommentTests.cs (2)
925Assert.True(SyntaxFacts.IsNewLine('\u0085')); 1203Assert.True(SyntaxFacts.IsNewLine('\u0085'));
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
CSharpTriviaFormatter.cs (1)
47=> SyntaxFacts.IsNewLine(ch);
ElasticTriviaFormattingRule.cs (1)
479=> triviaList.Sum(t => t.ToFullString().Replace("\r\n", "\r").Cast<char>().Count(c => SyntaxFacts.IsNewLine(c)));
TriviaDataFactory.CodeShapeAnalyzer.cs (1)
314if (!string.IsNullOrEmpty(triviaString) && SyntaxFacts.IsNewLine(triviaString.Last()))
TriviaDataFactory.cs (1)
27=> SyntaxFacts.IsWhitespace(c) || SyntaxFacts.IsNewLine(c);
Microsoft.CodeAnalysis.LanguageServer.Protocol (1)
Handler\Formatting\FormatDocumentOnTypeHandler.cs (1)
53if (string.IsNullOrEmpty(request.Character) || SyntaxFacts.IsNewLine(request.Character[0]))