Parse a file and return the syntax tree.
(
self, filename: Path, encoding: str | None = None, debug: bool = False
)
| 185 | return p.rootnode |
| 186 | |
| 187 | def parse_file( |
| 188 | self, filename: Path, encoding: str | None = None, debug: bool = False |
| 189 | ) -> NL: |
| 190 | """Parse a file and return the syntax tree.""" |
| 191 | with open(filename, encoding=encoding) as stream: |
| 192 | text = stream.read() |
| 193 | return self.parse_string(text, debug) |
| 194 | |
| 195 | def parse_string(self, text: str, debug: bool = False) -> NL: |
| 196 | """Parse a string and return the syntax tree.""" |
nothing calls this directly
no test coverage detected