68kcounter
Version:
68000 ASM source code cycle counter
18 lines (16 loc) • 459 B
text/typescript
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;
}