The f*ck is a JS interpreter

·

1 min read

Parser(Your shitty code) -> AST Tree (just Nodes[])

Node is an abstract type, implemented by specific child types

https://github.com/LuanRT/Jinter/blob/main/src/nodes/ArrowFunctionExpression.ts

Visitor -> Visit AST Tree (https://github.com/LuanRT/Jinter/blob/main/src/visitor.ts)

Visitor has Scope (for saving context information)

An interpreter "runs" your code using traversing through each node on the AST tree, then executes

The final API (kudos for https://github.com/luanRT) for creating this beautiful lib