2 instantiations of SyntaxTrivia
Microsoft.CodeAnalysis.CSharp (2)
Syntax\InternalSyntax\SyntaxTrivia.cs (1)
28return new SyntaxTrivia(kind, text);
Syntax\SyntaxFactory.cs (1)
206return new SyntaxTrivia(default(SyntaxToken), new Syntax.InternalSyntax.SyntaxTrivia(kind, text, null, null), 0, 0);
40 references to SyntaxTrivia
Microsoft.CodeAnalysis.CSharp (40)
Parser\Lexer.cs (2)
2269private SyntaxTrivia ScanWhitespace() 2329private static SyntaxTrivia CreateWhitespaceTrivia(SlidingTextWindow textWindow)
Parser\LexerCache.cs (4)
33private readonly TextKeyedCache<SyntaxTrivia> _triviaMap; 40_triviaMap = TextKeyedCache<SyntaxTrivia>.GetInstance(); 64internal SyntaxTrivia LookupTrivia<TArg>( 69Func<TArg, SyntaxTrivia> createTriviaFunction,
Syntax\InternalSyntax\CSharpSyntaxVisitor.cs (2)
30public virtual TResult VisitTrivia(SyntaxTrivia trivia) 58public virtual void VisitTrivia(SyntaxTrivia trivia)
Syntax\InternalSyntax\SyntaxFactory.cs (29)
18internal static readonly SyntaxTrivia CarriageReturnLineFeed = EndOfLine(CrLf); 19internal static readonly SyntaxTrivia LineFeed = EndOfLine("\n"); 20internal static readonly SyntaxTrivia CarriageReturn = EndOfLine("\r"); 21internal static readonly SyntaxTrivia Space = Whitespace(" "); 22internal static readonly SyntaxTrivia Tab = Whitespace("\t"); 24internal static readonly SyntaxTrivia ElasticCarriageReturnLineFeed = EndOfLine(CrLf, elastic: true); 25internal static readonly SyntaxTrivia ElasticLineFeed = EndOfLine("\n", elastic: true); 26internal static readonly SyntaxTrivia ElasticCarriageReturn = EndOfLine("\r", elastic: true); 27internal static readonly SyntaxTrivia ElasticSpace = Whitespace(" ", elastic: true); 28internal static readonly SyntaxTrivia ElasticTab = Whitespace("\t", elastic: true); 30internal static readonly SyntaxTrivia ElasticZeroSpace = Whitespace(string.Empty, elastic: true); 47internal static SyntaxTrivia EndOfLine(string text, bool elastic = false) 49SyntaxTrivia trivia = null; 71trivia = SyntaxTrivia.Create(SyntaxKind.EndOfLineTrivia, text); 80internal static SyntaxTrivia Whitespace(string text, bool elastic = false) 82var trivia = SyntaxTrivia.Create(SyntaxKind.WhitespaceTrivia, text); 91internal static SyntaxTrivia Comment(string text) 95return SyntaxTrivia.Create(SyntaxKind.MultiLineCommentTrivia, text); 99return SyntaxTrivia.Create(SyntaxKind.SingleLineCommentTrivia, text); 103internal static SyntaxTrivia ConflictMarker(string text) 104=> SyntaxTrivia.Create(SyntaxKind.ConflictMarkerTrivia, text); 106internal static SyntaxTrivia DisabledText(string text) 108return SyntaxTrivia.Create(SyntaxKind.DisabledTextTrivia, text); 111internal static SyntaxTrivia PreprocessingMessage(string text) 113return SyntaxTrivia.Create(SyntaxKind.PreprocessingMessageTrivia, text); 252internal static SyntaxTrivia DocumentationCommentExteriorTrivia(string text) 254return SyntaxTrivia.Create(SyntaxKind.DocumentationCommentExteriorTrivia, text); 327internal static IEnumerable<SyntaxTrivia> GetWellKnownTrivia()
Syntax\InternalSyntax\SyntaxTrivia.cs (3)
26internal static SyntaxTrivia Create(SyntaxKind kind, string text) 90public static implicit operator CodeAnalysis.SyntaxTrivia(SyntaxTrivia trivia) 102if (this.Text != ((SyntaxTrivia)other).Text)