cxx-frontend
    Preparing search index...

    Class Parser

    A parsed translation unit.

    Instances are created by Parser.parse, so a Parser is always fully parsed and every accessor is synchronous.

    The AST and the tokens are owned by the parser, they must not be used after the parser has been disposed.

    Implements

    • Disposable
    • AsyncDisposable
    Index
    • Releases the native resources owned by the parser.

      Calling dispose more than once is allowed, the AST and the tokens of a disposed parser must not be used.

      Returns void

    • Generates code in the given format.

      Type Parameters

      • Format extends "cxxir" | "mlir" | "llvm" | "asm" | "obj"

      Parameters

      • options: { format: Format }

        the output format.

      Returns OutputCode<Format>

      the generated code, a Uint8Array when the format is obj and a string for the textual formats.