UNPKG

68kcounter

Version:
18 lines (16 loc) 459 B
import { Variables } from "../parse/evaluate"; import { StatementNode } from "../parse/nodes"; import directiveSize from "./directiveSize"; import instructionSize from "./instructionSize"; export default function statementSize( statement: StatementNode, vars: Variables ): number { if (statement.isDirective()) { return directiveSize(statement, vars); } if (statement.isInstruction()) { return instructionSize(statement); } return 0; }