mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
17 lines
618 B
C#
17 lines
618 B
C#
using Microsoft.CodeAnalysis.CSharp.Syntax;
|
|
using Semmle.Extraction.Kinds;
|
|
|
|
namespace Semmle.Extraction.CSharp.Entities.Expressions
|
|
{
|
|
internal class SlicePattern : Expression
|
|
{
|
|
public SlicePattern(Context cx, SlicePatternSyntax syntax, IExpressionParentEntity parent, int child) :
|
|
base(new ExpressionInfo(cx, null, cx.CreateLocation(syntax.GetLocation()), ExprKind.SLICE_PATTERN, parent, child, isCompilerGenerated: false, null))
|
|
{
|
|
if (syntax.Pattern is not null)
|
|
{
|
|
Pattern.Create(cx, syntax.Pattern, this, 0);
|
|
}
|
|
}
|
|
}
|
|
} |