73 references to DefineDirectiveTrivia
Microsoft.CodeAnalysis.CSharp (9)
Parser\Directives.cs (4)
57case SyntaxKind.DefineDirectiveTrivia: 81case SyntaxKind.DefineDirectiveTrivia: 154case SyntaxKind.DefineDirectiveTrivia: 416case SyntaxKind.DefineDirectiveTrivia:
Syntax\CSharpSyntaxTree.cs (2)
244case SyntaxKind.DefineDirectiveTrivia: 275case SyntaxKind.DefineDirectiveTrivia:
Syntax\DirectiveTriviaSyntax.cs (1)
41case SyntaxKind.DefineDirectiveTrivia:
Syntax\SyntaxKindFacts.cs (1)
282case SyntaxKind.DefineDirectiveTrivia:
Syntax\SyntaxNodeRemover.cs (1)
444else if (directive.Kind() == SyntaxKind.DefineDirectiveTrivia ||
Microsoft.CodeAnalysis.CSharp.CodeStyle (2)
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
414SyntaxKind.DefineDirectiveTrivia or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
42public int DefineDirectiveTrivia => (int)SyntaxKind.DefineDirectiveTrivia;
Microsoft.CodeAnalysis.CSharp.Syntax.UnitTests (58)
LexicalAndXml\PreprocessorTests.cs (46)
191case SyntaxKind.DefineDirectiveTrivia: 516VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive }); 526VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive }); 587new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsNotActive }, 628new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsNotActive }, 1782VerifyDirectives(node, SyntaxKind.DefineDirectiveTrivia, SyntaxKind.DefineDirectiveTrivia, SyntaxKind.DefineDirectiveTrivia, 2400VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = defSym }); 2416VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "XXX" }); 2447new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "XXX" }, 2466new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsNotActive, Text = "XXX" }, 2485new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsNotActive, Text = defSym }, 2506new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = defSym }, 2521new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = string.Empty }); 2534new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = string.Empty }); 2547new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "GOO" }); 2629new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsNotActive, Text = "Z" }, 2658new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsNotActive, Text = "A" }, 2660new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsNotActive, Text = "B" }, 2689new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsNotActive, Text = "Z" }, 2691new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsNotActive, Text = "Z" }, 2720new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsNotActive, Text = "Z" }, 2723new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsNotActive, Text = "Z" }, 2833VerifyDirectivesSpecial(node, new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "A_1" }); 2865new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "error" }, 2897new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "if" }, 2898new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "else" }, 2899new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "elif" }, 2900new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "endif" }, 2901new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "region" }, 2902new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "endregion" }, 2903new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "define" }, 2904new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "undef" }, 2905new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "warning" }, 2906new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "error" }, 2907new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "line" }, 2908new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "pragma" }, 2909new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "reference" }); 2935new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "" }, 2936new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "" }, 2937new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "" }, 2938new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "" }, 2939new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "" }, 2940new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "" }, 2941new DirectiveInfo { Kind = SyntaxKind.DefineDirectiveTrivia, Status = NodeStatus.IsActive, Text = "" });
Syntax\SyntaxNodeTests.cs (12)
368testContainsHelper1("#define x", SyntaxKind.DefineDirectiveTrivia); 1355Assert.Equal(SyntaxKind.DefineDirectiveTrivia, trivia.Kind()); 1366Assert.Equal(SyntaxKind.DefineDirectiveTrivia, trivia.Kind()); 1403Assert.Equal(SyntaxKind.DefineDirectiveTrivia, d.Kind()); 1432Assert.Equal(SyntaxKind.DefineDirectiveTrivia, d1.Kind()); 1435Assert.Equal(SyntaxKind.DefineDirectiveTrivia, d2.Kind()); 1466Assert.Equal(SyntaxKind.DefineDirectiveTrivia, d3.Kind()); 1469Assert.Equal(SyntaxKind.DefineDirectiveTrivia, d4.Kind()); 1519Assert.Equal(SyntaxKind.DefineDirectiveTrivia, d.Kind()); 1550Assert.Equal(SyntaxKind.DefineDirectiveTrivia, d.Kind()); 1620Assert.Equal(SyntaxKind.DefineDirectiveTrivia, d.Kind()); 1654Assert.Equal(SyntaxKind.DefineDirectiveTrivia, d.Kind());
Microsoft.CodeAnalysis.CSharp.Workspaces (4)
Classification\Worker.cs (1)
242case SyntaxKind.DefineDirectiveTrivia:
Classification\Worker_Preprocesser.cs (1)
48case SyntaxKind.DefineDirectiveTrivia:
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SemanticFacts\CSharpSemanticFacts.cs (1)
414SyntaxKind.DefineDirectiveTrivia or
src\Workspaces\SharedUtilitiesAndExtensions\Compiler\CSharp\Services\SyntaxFacts\CSharpSyntaxKinds.cs (1)
42public int DefineDirectiveTrivia => (int)SyntaxKind.DefineDirectiveTrivia;