Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 9x 9x 9x 9x 9x 9x 9x 2x 2x 9x 7x 7x 7x 7x 9x 1x 1x | import * as Expressions from "../../2_statements/expressions";
import {ExpressionNode} from "../../nodes";
import {Source} from "./source";
import {VoidType, TableType} from "../../types/basic";
import {SyntaxInput, syntaxIssue} from "../_syntax_input";
export class SQLForAllEntries {
public static runSyntax(node: ExpressionNode, input: SyntaxInput): void {
let s = node.findFirstExpression(Expressions.Source);
if (s === undefined) {
s = node.findFirstExpression(Expressions.SimpleSource3);
}
if (s) {
const type = Source.runSyntax(s, input);
if (type instanceof VoidType) {
return;
}
if (!(type instanceof TableType)) {
const message = "FAE parameter must be table type, " + type?.constructor.name;
input.issues.push(syntaxIssue(input, node.getFirstToken(), message));
return;
}
const name = s.concatTokens().replace("[]", "");
input.scope.setAllowHeaderUse(name);
}
}
} |