Skip to content

Commit 5a80819

Browse files
committed
Address review comments
1 parent b11fc2f commit 5a80819

File tree

3 files changed

+8
-9
lines changed

3 files changed

+8
-9
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
lgtm,codescanning
2-
* The `RelationalPatternExpr` and its 4 subclass have been added to support C# 9
2+
* The `RelationalPatternExpr` and its 4 sub class have been added to support C# 9
33
relational `<`, `>`, `<=`, and `>=` patterns.

csharp/extractor/Semmle.Extraction.CSharp/Entities/Expressions/Patterns/RecursivePattern.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace Semmle.Extraction.CSharp.Entities.Expressions
88
{
9-
internal partial class RecursivePattern : Expression
9+
internal class RecursivePattern : Expression
1010
{
1111
/// <summary>
1212
/// Creates and populates a recursive pattern.
@@ -15,7 +15,6 @@ internal partial class RecursivePattern : Expression
1515
/// <param name="syntax">The syntax node of the recursive pattern.</param>
1616
/// <param name="parent">The parent pattern/expression.</param>
1717
/// <param name="child">The child index of this pattern.</param>
18-
/// <param name="isTopLevel">If this pattern is in the top level of a case/is. In that case, the variable and type access are populated elsewhere.</param>
1918
public RecursivePattern(Context cx, RecursivePatternSyntax syntax, IExpressionParentEntity parent, int child) :
2019
base(new ExpressionInfo(cx, Entities.NullType.Create(cx), cx.Create(syntax.GetLocation()), ExprKind.RECURSIVE_PATTERN, parent, child, false, null))
2120
{

csharp/ql/src/semmle/code/csharp/exprs/Expr.qll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,8 @@ class ConstantPatternExpr extends PatternExpr {
343343
}
344344

345345
/** A relational pattern, for example `>1` in `x is >1`. */
346-
abstract class RelationalPatternExpr extends PatternExpr, @relational_pattern_expr {
347-
/** Get the operator of this relational pattern. */
346+
class RelationalPatternExpr extends PatternExpr, @relational_pattern_expr {
347+
/** Gets the name of the operator in this pattern. */
348348
string getOperator() { none() }
349349

350350
/** Gets the expression of this relational pattern. */
@@ -353,28 +353,28 @@ abstract class RelationalPatternExpr extends PatternExpr, @relational_pattern_ex
353353
override string toString() { result = getOperator() + " ..." }
354354
}
355355

356-
/** A 'less than' pattern */
356+
/** A less-than pattern, for example `< 10` in `x is < 10`. */
357357
class LTPattern extends RelationalPatternExpr, @lt_pattern_expr {
358358
override string getOperator() { result = "<" }
359359

360360
override string getAPrimaryQlClass() { result = "LTPattern" }
361361
}
362362

363-
/** A 'greater than' pattern */
363+
/** A greater-than pattern, for example `> 10` in `x is > 10`. */
364364
class GTPattern extends RelationalPatternExpr, @gt_pattern_expr {
365365
override string getOperator() { result = ">" }
366366

367367
override string getAPrimaryQlClass() { result = "GTPattern" }
368368
}
369369

370-
/** A 'less than equal' pattern */
370+
/** A less-than or equals pattern, for example `<= 10` in `x is <= 10`. */
371371
class LEPattern extends RelationalPatternExpr, @le_pattern_expr {
372372
override string getOperator() { result = "<=" }
373373

374374
override string getAPrimaryQlClass() { result = "LEPattern" }
375375
}
376376

377-
/** A 'greater than equal' pattern */
377+
/** A greater-than or equals pattern, for example `>= 10` in `x is >= 10` */
378378
class GEPattern extends RelationalPatternExpr, @ge_pattern_expr {
379379
override string getOperator() { result = ">=" }
380380

0 commit comments

Comments
 (0)