WITH narrowX: x
SELECT
FROM
id => RETURN[TRUE, NIL];
constant => RETURN[TRUE, NIL];
unX => {
continue: BOOL;
ref: REF ANY;
[continue, ref] ← enum[narrowX.exp1];
IF ~continue THEN RETURN[FALSE, ref];
RETURN[TRUE, NIL];
};
binX => {
continue: BOOL;
ref: REF ANY;
[continue, ref] ← enum[narrowX.exp1];
IF ~continue THEN RETURN[FALSE, ref];
[continue, ref] ← enum[narrowX.exp2];
IF ~continue THEN RETURN[FALSE, ref];
RETURN[TRUE, NIL];
};
trinX => {
continue: BOOL;
ref: REF ANY;
[continue, ref] ← enum[narrowX.exp1];
IF ~continue THEN RETURN[FALSE, ref];
[continue, ref] ← enum[narrowX.exp2];
IF ~continue THEN RETURN[FALSE, ref];
[continue, ref] ← enum[narrowX.exp3];
IF ~continue THEN RETURN[FALSE, ref];
RETURN[TRUE, NIL];
};
fcn => {
continue: BOOL;
ref: REF ANY;
FOR xChild:
LIST
OF XTree ← narrowX.args, xChild.rest
UNTIL xChild=
NIL
DO
[continue, ref] ← enum[xChild.first];
IF ~continue THEN RETURN[FALSE, ref];
ENDLOOP;
RETURN[TRUE, NIL];
};
ENDCASE => ERROR;