Add missing qldoc

This commit is contained in:
Chris Smowton
2023-11-03 16:35:13 +00:00
parent db5979f1ac
commit ded8deceaa
2 changed files with 9 additions and 0 deletions

View File

@@ -2556,5 +2556,8 @@ class RecordPatternExpr extends Expr, @recordpatternexpr {
override string getAPrimaryQlClass() { result = "RecordPatternExpr" }
/**
* Gets the `i`th subpattern of this record pattern.
*/
Pattern getSubPattern(int i) { result.isNthChildOf(this, i) }
}

View File

@@ -542,8 +542,14 @@ class Pattern extends Expr {
(this instanceof LocalVariableDeclExpr or this instanceof RecordPatternExpr)
}
/**
* Gets this pattern cast to a binding pattern.
*/
LocalVariableDeclExpr asBindingPattern() { result = this }
/**
* Gets this pattern cast to a record pattern.
*/
RecordPatternExpr asRecordPattern() { result = this }
}