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 | 1x 1x 1x 1x 1x 1x 1598x 1598x 1598x 1598x 108x 108x 1490x 1490x 1490x 1598x 4x 4x 4x 4x 4x 1490x 1490x 1x | import {ExpressionNode} from "../../nodes"; import {CurrentScope} from "../_current_scope"; import {ReferenceType} from "../_reference"; export class SourceField { public runSyntax(node: ExpressionNode, scope: CurrentScope, filename: string, type?: ReferenceType | ReferenceType[]) { const token = node.getFirstToken(); const name = token.getStr(); const found = scope.findVariable(name); if (found === undefined) { throw new Error("\"" + name + "\" not found, findTop"); } if (type) { scope.addReference(token, found, type, filename); } if (name.includes("~")) { const idef = scope.findInterfaceDefinition(name.split("~")[0]); if (idef) { scope.addReference(token, idef, ReferenceType.ObjectOrientedReference, filename); } } return found.getType(); } } |