Basic extraction of record patterns

This commit is contained in:
Chris Smowton
2023-11-01 16:05:53 +00:00
parent 293cc67494
commit daccd04087
10 changed files with 93 additions and 42 deletions

View File

@@ -2541,3 +2541,10 @@ class NotNullExpr extends UnaryExpr, @notnullexpr {
override string getAPrimaryQlClass() { result = "NotNullExpr" }
}
/** A record pattern expr, as in `if (x instanceof SomeRecord(int field))`. */
class RecordPatternExpr extends Expr, @recordpatternexpr {
override string toString() { result = this.getType().toString() + "(...)" }
override string getAPrimaryQlClass() { result = "RecordPatternExpr" }
}