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