Parse a full Python module usually consisting of multiple lines. This is a convenience function that can be used to parse a full Python program without having to specify the [`Mode`] or the location. It is probably what you want to use most of the time. # Example For example, parsing a simple function definition and a call to that function: ``` use sith_python_parser::parse_module; let source
(source: &str)
| 106 | /// assert!(module.is_valid()); |
| 107 | /// ``` |
| 108 | pub fn parse_module(source: &str) -> Parsed<ModModule> { |
| 109 | Parser::new(source, Mode::Module) |
| 110 | .parse() |
| 111 | .try_into_module() |
| 112 | .unwrap() |
| 113 | } |
| 114 | |
| 115 | /// Parses a single Python expression. |
| 116 | /// |