Skip to content

Conversation

@simonw
Copy link
Owner

@simonw simonw commented Dec 27, 2025

Checkout github.com/simonw/tools to /tmp for reference

Build a playground.html HTML page which uses micropip to install micro-javascript from PiPI and then implements a comprehensive explanatory debugging interface. You can enter javaScript code (or click to load a demo script) in a textarea and the tool then runs the lexer and parser and shows you their outputs in a visually useful way on the page - it does this as you modify the textarea including showing parse errors live if there are any.

https://gistpreview.github.io/?b5281b5cdcc09a1cad1afed3101260fe/index.html

claude and others added 3 commits December 27, 2025 17:49
HTML page using Pyodide/micropip to load micro-javascript from PyPI.
Features:
- Live lexer output with color-coded tokens by type
- Live parser output with collapsible AST tree view
- 10 demo scripts showcasing various JavaScript features
- Real-time error display with line/column indicators
- Debounced updates as you type
- Default to system preference via prefers-color-scheme
- Add theme toggle button cycling: auto -> light -> dark -> auto
- Persist theme choice in localStorage
- Use CSS variables for all theme-dependent colors
- Include accessible SVG icons for each theme state
@simonw simonw merged commit 963784a into main Dec 27, 2025
10 checks passed
@simonw simonw deleted the claude/js-debugging-playground-LzrCk branch December 27, 2025 18:04
simonw added a commit that referenced this pull request Dec 27, 2025
simonw added a commit that referenced this pull request Dec 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants