70 references to DefineDirectiveTrivia
Microsoft.CodeAnalysis.CSharp (9)
Parser\Directives.cs (4)
57
case SyntaxKind.
DefineDirectiveTrivia
:
81
case SyntaxKind.
DefineDirectiveTrivia
:
154
case SyntaxKind.
DefineDirectiveTrivia
:
416
case SyntaxKind.
DefineDirectiveTrivia
:
Syntax\CSharpSyntaxTree.cs (2)
244
case SyntaxKind.
DefineDirectiveTrivia
:
275
case SyntaxKind.
DefineDirectiveTrivia
:
Syntax\DirectiveTriviaSyntax.cs (1)
41
case SyntaxKind.
DefineDirectiveTrivia
:
Syntax\SyntaxKindFacts.cs (1)
282
case SyntaxKind.
DefineDirectiveTrivia
:
Syntax\SyntaxNodeRemover.cs (1)
444
else if (directive.Kind() == SyntaxKind.
DefineDirectiveTrivia
||
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (59)
LexicalAndXml\PreprocessorTests.cs (47)
191
case SyntaxKind.
DefineDirectiveTrivia
:
516
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive });
526
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive });
587
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsNotActive },
628
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsNotActive },
1782
VerifyDirectives(node, SyntaxKind.
DefineDirectiveTrivia
, SyntaxKind.
DefineDirectiveTrivia
, SyntaxKind.
DefineDirectiveTrivia
,
2400
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = defSym });
2416
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "XXX" });
2429
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "XXX" });
2447
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "XXX" },
2466
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsNotActive, Text = "XXX" },
2485
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsNotActive, Text = defSym },
2506
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = defSym },
2521
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = string.Empty });
2534
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = string.Empty });
2547
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "GOO" });
2629
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsNotActive, Text = "Z" },
2658
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsNotActive, Text = "A" },
2660
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsNotActive, Text = "B" },
2689
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsNotActive, Text = "Z" },
2691
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsNotActive, Text = "Z" },
2720
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsNotActive, Text = "Z" },
2723
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsNotActive, Text = "Z" },
2833
VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "A_1" });
2865
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "error" },
2897
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "if" },
2898
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "else" },
2899
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "elif" },
2900
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "endif" },
2901
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "region" },
2902
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "endregion" },
2903
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "define" },
2904
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "undef" },
2905
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "warning" },
2906
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "error" },
2907
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "line" },
2908
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "pragma" },
2909
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "reference" });
2935
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "" },
2936
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "" },
2937
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "" },
2938
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "" },
2939
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "" },
2940
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "" },
2941
new DirectiveInfo { Kind = SyntaxKind.
DefineDirectiveTrivia
, Status = NodeStatus.IsActive, Text = "" });
Syntax\SyntaxNodeTests.cs (12)
371
testContainsHelper1("#define x", SyntaxKind.
DefineDirectiveTrivia
);
1332
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, trivia.Kind());
1343
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, trivia.Kind());
1380
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d.Kind());
1409
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d1.Kind());
1412
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d2.Kind());
1443
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d3.Kind());
1446
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d4.Kind());
1496
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d.Kind());
1527
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d.Kind());
1597
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d.Kind());
1631
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d.Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (2)
Classification\Worker.cs (1)
242
case SyntaxKind.
DefineDirectiveTrivia
:
Classification\Worker_Preprocesser.cs (1)
48
case SyntaxKind.
DefineDirectiveTrivia
: