Add trait Parse and Parse::parse to use with each types.
youknowone opened this issue · 0 comments
youknowone commented
With code
let parsed = parse(code, path, Mode::Exec)The result parsed is always ast::ModModule. But it currently returns ast::Mod::Module.
suggestion:
let parsed = ast::ModModule::parse(code, path)previous parse_* functions can remains for CPython friendly API