(
source: str, parser_class: type[Parser], *, dedent: bool = True, verbose: bool = False
)
| 46 | |
| 47 | |
| 48 | def parse_string( |
| 49 | source: str, parser_class: type[Parser], *, dedent: bool = True, verbose: bool = False |
| 50 | ) -> Any: |
| 51 | # Run the parser on a string. |
| 52 | if dedent: |
| 53 | source = textwrap.dedent(source) |
| 54 | file = io.StringIO(source) |
| 55 | return run_parser(file, parser_class, verbose=verbose) # type: ignore[arg-type] # typeshed issue #3515 |
| 56 | |
| 57 | |
| 58 | def make_parser(source: str) -> type[Parser]: |
no test coverage detected
searching dependent graphs…