Skip to content

Phase 0: Research & Setup #31

@jschatz1

Description

@jschatz1

Duration: 2 weeks

Study the Source

  1. Read bun/src/js_parser.zig - main parser
  2. Read esbuild's parser (Go) for comparison - it's the original
  3. Document the architecture decisions

Key Insight from Bun

"Everything is either an Expression, a Binding, or a Statement" - naming conventions from esbuild

Setup

howth/
└── crates/
    └── howth-parser/        # New crate
        ├── src/
        │   ├── lib.rs
        │   ├── lexer.rs     # Tokenizer
        │   ├── token.rs     # Token types
        │   ├── ast.rs       # AST node types
        │   ├── parser.rs    # Main parser
        │   ├── expr.rs      # Expression parsing
        │   ├── stmt.rs      # Statement parsing
        │   ├── binding.rs   # Binding patterns
        │   ├── typescript.rs # TS extensions
        │   ├── jsx.rs       # JSX extensions
        │   └── codegen.rs   # Output generation
        └── Cargo.toml

Deliverables

  • Document Bun parser architecture
  • Document esbuild parser architecture
  • Create howth-parser crate skeleton
  • Define initial module structure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions