shift-interpreter
Version:
Shift-interpreter is an experimental JavaScript meta-interpreter useful for reverse engineering and analysis. One notable difference from other projects is that shift-interpreter retains state over an entire script but can be fed expressions and statement
7 lines (6 loc) • 811 B
TypeScript
import { AssignmentTargetIdentifier, BindingIdentifier, Block, DoWhileStatement, Expression, ForInStatement, ForOfStatement, ForStatement, FunctionBody, FunctionDeclaration, FunctionExpression, Getter, IdentifierExpression, Method, Script, Setter, Statement, Super, VariableDeclarator, WhileStatement } from 'shift-ast';
export declare type Identifier = BindingIdentifier | IdentifierExpression | AssignmentTargetIdentifier;
export declare type Loop = ForStatement | WhileStatement | ForOfStatement | ForInStatement | DoWhileStatement;
export declare type BlockType = Script | Block | FunctionBody;
export declare type FuncType = FunctionDeclaration | FunctionExpression | Method | Getter | Setter;
export declare type InstructionNode = Script | Statement | Expression | Super | BlockType | VariableDeclarator;