Move ReturningStmt::getValue implementation to internal library

This commit is contained in:
Arthur Baars
2021-02-09 14:01:08 +01:00
parent e398837bdc
commit daa7bd7fd4
2 changed files with 11 additions and 10 deletions

View File

@@ -8,6 +8,16 @@ module Stmt {
module ReturningStmt {
abstract class Range extends Stmt::Range {
abstract Generated::ArgumentList getArgumentList();
final Expr getValue() {
exists(Generated::ArgumentList a, int c |
a = this.getArgumentList() and c = count(a.getChild(_))
|
result = a.getChild(0) and c = 1
or
result = a and c > 1
)
}
}
}