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