The Python source code to parse
Optionaloptions: { filename?: string; comments?: boolean }
Optional parsing options
Optionalfilename?: stringThe filename to attribute in error messages
(default: '<unknown>')
Optionalcomments?: booleanWhether to attach comment nodes to the tree
The parsed module's AST
Parse Python source code and return an AST (simplified API).
Thin wrapper over parse that accepts a smaller, more convenient options shape.