mirror of
https://github.com/github/codeql.git
synced 2025-12-17 17:23:36 +01:00
22 lines
670 B
C#
22 lines
670 B
C#
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
using Semmle.Extraction.Kinds;
|
|
using System.IO;
|
|
|
|
namespace Semmle.Extraction.CSharp.Entities.Expressions
|
|
{
|
|
internal class IsPattern : Expression<IsPatternExpressionSyntax>
|
|
{
|
|
private IsPattern(ExpressionNodeInfo info) : base(info.SetKind(ExprKind.IS))
|
|
{
|
|
}
|
|
|
|
protected override void PopulateExpression(TextWriter trapFile)
|
|
{
|
|
Create(Context, Syntax.Expression, this, 0);
|
|
Expressions.Pattern.Create(Context, Syntax.Pattern, this, 1);
|
|
}
|
|
|
|
public static Expression Create(ExpressionNodeInfo info) => new IsPattern(info).TryPopulate();
|
|
}
|
|
}
|