Skip to content

Function: parseAst()

  • Exported from: rolldown/parseAst
  • Type: (sourceText: string, options?: ParserOptions | null, filename?: string) => Program

Parse code synchronously and return the AST.

This function is similar to Rollup's parseAst function. Prefer using parseSync instead of this function as it has more information in the return value.

Parameters

sourceText

string

options?

ParserOptions | null

filename?

string

Returns

Program