Class Transpiler

The Transpiler class is responsible for converting parsed code into executable JavaScript. It provides the functionality to transpile code into a JavaScript function with support for loops, printing, and other constructs.

Constructors

Properties

Accessors

Methods

  • Increments the loop iterator count. This is used for generating unique iterator variable names in loops.

    Returns number

    The next loop iterator count.

  • Runs the compilation process, converting the parsed tokens into executable JavaScript code.

    Returns { executionTime: number; outputCode: string }

    An object containing the transpiled output code and the execution time.