micro-javascript parser playground

Explore the lexer and parser internals - see how JavaScript code is tokenized and parsed into an AST

Try an example:

JavaScript Input Loading Pyodide...
Tokens (Lexer Output)
Waiting for Pyodide to load...
AST (Parser Output)
Waiting for Pyodide to load...
How it works: micro-javascript is a pure Python JavaScript sandbox engine. The Lexer breaks source code into tokens (identifiers, keywords, operators, literals). The Parser builds an Abstract Syntax Tree (AST) representing the code structure. View on GitHub