3 types derived from CSharpSyntaxNode
Microsoft.CodeAnalysis.CSharp (3)
Syntax\InternalSyntax\StructuredTriviaSyntax.cs (1)
11
internal abstract partial class StructuredTriviaSyntax :
CSharpSyntaxNode
Syntax\InternalSyntax\SyntaxToken.cs (1)
15
internal partial class SyntaxToken :
CSharpSyntaxNode
Syntax\InternalSyntax\SyntaxTrivia.cs (1)
10
internal class SyntaxTrivia :
CSharpSyntaxNode
128 references to CSharpSyntaxNode
Microsoft.CodeAnalysis.CSharp (126)
CSharpExtensions.cs (2)
324
return ((Syntax.InternalSyntax.
CSharpSyntaxNode
)node.Green).ApplyDirectives(stack);
329
return ((Syntax.InternalSyntax.
CSharpSyntaxNode
)token.Node!).ApplyDirectives(stack);
Declarations\DeclarationTreeBuilder.cs (5)
988
static bool checkPropertyOrFieldMemberForRequiredModifier(Syntax.InternalSyntax.
CSharpSyntaxNode
member)
1052
private static bool CheckMethodMemberForExtensionSyntax(Syntax.InternalSyntax.
CSharpSyntaxNode
member)
1079
private static bool CheckMemberForAttributes(Syntax.InternalSyntax.
CSharpSyntaxNode
member)
1129
Syntax.InternalSyntax.
CSharpSyntaxNode
member, HashSet<string> set)
1227
Syntax.InternalSyntax.
CSharpSyntaxNode
member, bool skipGlobalStatements)
Parser\Blender.Reader.cs (1)
242
(nodeOrToken.IsToken && ((
CSharpSyntaxNode
)nodeOrToken.AsToken().Node).ContainsSkippedText && nodeOrToken.Parent.ContainsDiagnostics))
Parser\DirectiveParser.cs (4)
31
public
CSharpSyntaxNode
ParseDirective(
49
CSharpSyntaxNode
result;
292
foreach (
var
t in keyword.TrailingTrivia)
308
foreach (
var
node in eod.LeadingTrivia)
Parser\DocumentationCommentParser.cs (4)
377
) where T :
CSharpSyntaxNode
418
list[list.Count - 1] = AddTrailingSkippedSyntax((
CSharpSyntaxNode
)list[list.Count - 1], badTokens.ToListNode());
831
private TNode WithXmlParseError<TNode>(TNode node, XmlParseErrorCode code) where TNode :
CSharpSyntaxNode
836
private TNode WithXmlParseError<TNode>(TNode node, XmlParseErrorCode code, params string[] args) where TNode :
CSharpSyntaxNode
Parser\LanguageParser.cs (26)
208
internal TNode ParseWithStackGuard<TNode>(Func<LanguageParser, TNode> parseFunc, Func<LanguageParser, TNode> createEmptyNodeFunc) where TNode :
CSharpSyntaxNode
224
private TNode CreateForGlobalFailure<TNode>(int position, TNode node) where TNode :
CSharpSyntaxNode
366
CSharpSyntaxNode
skippedSyntax)
2040
(
CSharpSyntaxNode
)previousNode,
2210
CSharpSyntaxNode
tmp = null;
3273
public static bool IsComplete(
CSharpSyntaxNode
node)
3284
return IsComplete((
CSharpSyntaxNode
)child);
4250
where T :
CSharpSyntaxNode
4251
where TNode :
CSharpSyntaxNode
4270
where T :
CSharpSyntaxNode
4271
where TNode :
CSharpSyntaxNode
4316
out GreenNode trailingTrivia) where TNode :
CSharpSyntaxNode
4904
private TNode EatUnexpectedTrailingSemicolon<TNode>(TNode decl) where TNode :
CSharpSyntaxNode
5095
CSharpSyntaxNode
tmp = null;
6345
CSharpSyntaxNode
tmp = null;
7757
PostSkipAction skipBadFunctionPointerTokens<T>(SeparatedSyntaxListBuilder<T> list) where T :
CSharpSyntaxNode
7759
CSharpSyntaxNode
? tmp = null;
8676
CSharpSyntaxNode
openBrace = isAccessorBody && this.CurrentToken.Kind != SyntaxKind.OpenBraceToken
8713
CSharpSyntaxNode
openBrace = this.EatToken(SyntaxKind.OpenBraceToken);
8747
private void ParseStatements(ref
CSharpSyntaxNode
previousNode, SyntaxListBuilder<StatementSyntax> statements, bool stopOnSwitchSections)
9813
var
node = ParseExpressionOrPatternForSwitchStatement();
9852
CSharpSyntaxNode
tmp = labels[^1];
11444
var
node = this.ParseTypeOrPatternForIsOperator();
13015
where T :
CSharpSyntaxNode
13780
CSharpSyntaxNode
tmp = null;
14117
internal TNode ConsumeUnexpectedTokens<TNode>(TNode node) where TNode :
CSharpSyntaxNode
Parser\LanguageParser_Patterns.cs (4)
21
private
CSharpSyntaxNode
ParseTypeOrPatternForIsOperator()
434
private
CSharpSyntaxNode
ParseExpressionOrPatternForSwitchStatement()
443
private
CSharpSyntaxNode
ConvertPatternToExpressionIfPossible(PatternSyntax pattern, bool permitTypeArguments = false)
541
where T :
CSharpSyntaxNode
Parser\Lexer.cs (16)
1989
var
endOfLine = this.ScanEndOfLine();
2217
private void AddTrivia(
CSharpSyntaxNode
trivia, [NotNull] ref SyntaxListBuilder? list)
2273
private
CSharpSyntaxNode
? ScanEndOfLine()
2368
var
directive = this.LexSingleDirective(true, true, isFollowingToken, ref triviaList);
2383
var
text = this.LexDisabledText(out hasFollowingDirective);
2394
var
directive = this.LexSingleDirective(false, endIsActive, false, ref triviaList);
2407
private
CSharpSyntaxNode
LexSingleDirective(
2419
CSharpSyntaxNode
directive = ParseDirective(isActive, endIsActive, isFollowingToken);
2426
private
CSharpSyntaxNode
ParseDirective(
2436
CSharpSyntaxNode
directive = _directiveParser.ParseDirective(isActive, endIsActive, isFollowingToken);
2443
private
CSharpSyntaxNode
? LexDisabledText(out bool followedByDirective)
2723
CSharpSyntaxNode
? tr;
2753
private
CSharpSyntaxNode
? LexDirectiveTrivia()
2755
CSharpSyntaxNode
? trivia = null;
2799
private
CSharpSyntaxNode
LexXmlDocComment(XmlDocCommentStyle style)
4541
var
endOfLine = this.ScanEndOfLine();
Parser\SyntaxParser.cs (16)
726
SyntaxList<
CSharpSyntaxNode
> triviaList = new SyntaxList<
CSharpSyntaxNode
>(trivia);
794
foreach (
var
trivia in token.TrailingTrivia)
819
protected TNode AddError<TNode>(TNode node, int offset, int length, ErrorCode code, params object[] args) where TNode :
CSharpSyntaxNode
824
protected TNode AddError<TNode>(TNode node,
CSharpSyntaxNode
location, ErrorCode code, params object[] args) where TNode :
CSharpSyntaxNode
832
protected TNode AddErrorToFirstToken<TNode>(TNode node, ErrorCode code) where TNode :
CSharpSyntaxNode
838
protected TNode AddErrorToFirstToken<TNode>(TNode node, ErrorCode code, params object[] args) where TNode :
CSharpSyntaxNode
844
protected TNode AddErrorToLastToken<TNode>(TNode node, ErrorCode code) where TNode :
CSharpSyntaxNode
852
protected TNode AddErrorToLastToken<TNode>(TNode node, ErrorCode code, params object[] args) where TNode :
CSharpSyntaxNode
860
private static void GetOffsetAndWidthForLastToken<TNode>(TNode node, out int offset, out int width) where TNode :
CSharpSyntaxNode
895
protected TNode AddLeadingSkippedSyntax<TNode>(TNode node, GreenNode? skippedSyntax) where TNode :
CSharpSyntaxNode
909
list[list.Count - 1] = AddTrailingSkippedSyntax((
CSharpSyntaxNode
)list[list.Count - 1], skippedSyntax);
912
protected void AddTrailingSkippedSyntax<TNode>(SyntaxListBuilder<TNode> list, GreenNode skippedSyntax) where TNode :
CSharpSyntaxNode
917
protected TNode AddTrailingSkippedSyntax<TNode>(TNode node, GreenNode skippedSyntax) where TNode :
CSharpSyntaxNode
1050
private bool FindOffset(GreenNode root,
CSharpSyntaxNode
location, out int offset)
Syntax\CSharpSyntaxNode.cs (2)
142
internal Syntax.InternalSyntax.
CSharpSyntaxNode
CsGreen
144
get { return (Syntax.InternalSyntax.
CSharpSyntaxNode
)this.Green; }
Syntax\InternalSyntax\CSharpSyntaxNode.cs (1)
172
return ((
CSharpSyntaxNode
)listOrNode).ApplyDirectives(stack);
Syntax\InternalSyntax\CSharpSyntaxRewriter.cs (6)
11
internal partial class CSharpSyntaxRewriter : CSharpSyntaxVisitor<
CSharpSyntaxNode
>
21
public override
CSharpSyntaxNode
VisitToken(SyntaxToken token)
42
public SyntaxList<TNode> VisitList<TNode>(SyntaxList<TNode> list) where TNode :
CSharpSyntaxNode
48
var
visited = this.Visit(item);
70
public SeparatedSyntaxList<TNode> VisitList<TNode>(SeparatedSyntaxList<TNode> list) where TNode :
CSharpSyntaxNode
75
var withSeps = (SyntaxList<
CSharpSyntaxNode
>)list.GetWithSeparators();
Syntax\InternalSyntax\CSharpSyntaxVisitor.cs (4)
15
public virtual TResult Visit(
CSharpSyntaxNode
node)
35
protected virtual TResult DefaultVisit(
CSharpSyntaxNode
node)
43
public virtual void Visit(
CSharpSyntaxNode
node)
63
public virtual void DefaultVisit(
CSharpSyntaxNode
node)
Syntax\InternalSyntax\SyntaxFactory.cs (18)
257
public static SyntaxList<TNode> List<TNode>() where TNode :
CSharpSyntaxNode
262
public static SyntaxList<TNode> List<TNode>(TNode node) where TNode :
CSharpSyntaxNode
267
public static SyntaxList<TNode> List<TNode>(TNode node0, TNode node1) where TNode :
CSharpSyntaxNode
272
internal static GreenNode ListNode(
CSharpSyntaxNode
node0,
CSharpSyntaxNode
node1)
277
public static SyntaxList<TNode> List<TNode>(TNode node0, TNode node1, TNode node2) where TNode :
CSharpSyntaxNode
282
internal static GreenNode ListNode(
CSharpSyntaxNode
node0,
CSharpSyntaxNode
node1,
CSharpSyntaxNode
node2)
287
public static SyntaxList<TNode> List<TNode>(params TNode[] nodes) where TNode :
CSharpSyntaxNode
302
public static SeparatedSyntaxList<TNode> SeparatedList<TNode>(TNode node) where TNode :
CSharpSyntaxNode
304
return new SeparatedSyntaxList<TNode>(new SyntaxList<
CSharpSyntaxNode
>(node));
307
public static SeparatedSyntaxList<TNode> SeparatedList<TNode>(SyntaxToken token) where TNode :
CSharpSyntaxNode
309
return new SeparatedSyntaxList<TNode>(new SyntaxList<
CSharpSyntaxNode
>(token));
312
public static SeparatedSyntaxList<TNode> SeparatedList<TNode>(TNode node1, SyntaxToken token, TNode node2) where TNode :
CSharpSyntaxNode
314
return new SeparatedSyntaxList<TNode>(new SyntaxList<
CSharpSyntaxNode
>(SyntaxList.List(node1, token, node2)));
317
public static SeparatedSyntaxList<TNode> SeparatedList<TNode>(params
CSharpSyntaxNode
[] nodes) where TNode :
CSharpSyntaxNode
Syntax\InternalSyntax\SyntaxFirstTokenReplacer.cs (4)
30
where TRoot :
CSharpSyntaxNode
38
public override
CSharpSyntaxNode
Visit(
CSharpSyntaxNode
node)
59
private static TSyntax UpdateDiagnosticOffset<TSyntax>(TSyntax node, int diagnosticOffsetDelta) where TSyntax :
CSharpSyntaxNode
Syntax\InternalSyntax\SyntaxLastTokenReplacer.cs (4)
28
where TRoot :
CSharpSyntaxNode
37
private static int CountNonNullSlots(
CSharpSyntaxNode
node)
42
public override
CSharpSyntaxNode
Visit(
CSharpSyntaxNode
node)
Syntax\InternalSyntax\SyntaxToken.cs (6)
246
internal static SyntaxToken StringLiteral(
CSharpSyntaxNode
leading, string text,
CSharpSyntaxNode
trailing)
332
internal SyntaxList<
CSharpSyntaxNode
> LeadingTrivia
334
get { return new SyntaxList<
CSharpSyntaxNode
>(this.GetLeadingTrivia()); }
337
internal SyntaxList<
CSharpSyntaxNode
> TrailingTrivia
339
get { return new SyntaxList<
CSharpSyntaxNode
>(this.GetTrailingTrivia()); }
Syntax\StructuredTriviaSyntax.cs (1)
16
internal StructuredTriviaSyntax(InternalSyntax.
CSharpSyntaxNode
green, SyntaxNode parent, int position)
Syntax\SyntaxEquivalence.cs (2)
262
using var beforeDirectivesEnumerator = ((Green.
CSharpSyntaxNode
)before).GetDirectives().GetEnumerator();
263
using var afterDirectivesEnumerator = ((Green.
CSharpSyntaxNode
)after).GetDirectives().GetEnumerator();
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (2)
Syntax\SyntaxRewriterTests.cs (2)
696
var
green = red.CsGreen;
740
var
visited = base.Visit(node);