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 | 1x 1x 1x 1x 1x 1x 1x 1x 92x 92x 92x 2x 2x 2x 2x 90x 90x 90x 1x | import {ExpressionNode} from "../../nodes";
import {VoidType} from "../../types/basic";
import {AbstractType} from "../../types/basic/_abstract_type";
import {ReferenceType} from "../_reference";
import {CheckSyntaxKey, SyntaxInput, syntaxIssue} from "../_syntax_input";
export class SourceFieldSymbol {
public static runSyntax(node: ExpressionNode, input: SyntaxInput): AbstractType {
const token = node.getFirstToken();
const found = input.scope.findVariable(token.getStr());
if (found === undefined) {
const message = "\"" + node.getFirstToken().getStr() + "\" not found, SourceFieldSymbol";
input.issues.push(syntaxIssue(input, node.getFirstToken(), message));
return VoidType.get(CheckSyntaxKey);
}
input.scope.addReference(token, found, ReferenceType.DataReadReference, input.filename);
return found.getType();
}
} |