73 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.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
414
SyntaxKind.
DefineDirectiveTrivia
or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
42
public int DefineDirectiveTrivia => (int)SyntaxKind.
DefineDirectiveTrivia
;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (58)
LexicalAndXml\PreprocessorTests.cs (46)
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" });
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)
368
testContainsHelper1("#define x", SyntaxKind.
DefineDirectiveTrivia
);
1355
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, trivia.Kind());
1366
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, trivia.Kind());
1403
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d.Kind());
1432
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d1.Kind());
1435
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d2.Kind());
1466
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d3.Kind());
1469
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d4.Kind());
1519
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d.Kind());
1550
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d.Kind());
1620
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d.Kind());
1654
Assert.Equal(SyntaxKind.
DefineDirectiveTrivia
, d.Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Classification\Worker.cs (1)
242
case SyntaxKind.
DefineDirectiveTrivia
:
Classification\Worker_Preprocesser.cs (1)
48
case SyntaxKind.
DefineDirectiveTrivia
:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
414
SyntaxKind.
DefineDirectiveTrivia
or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
42
public int DefineDirectiveTrivia => (int)SyntaxKind.
DefineDirectiveTrivia
;