| 167 | |
| 168 | |
| 169 | class State: |
| 170 | def __init__(self, options: Options) -> None: |
| 171 | self.options = options |
| 172 | self.errors: list[ParseError] = [] |
| 173 | self.num_funcs = 0 |
| 174 | |
| 175 | def add_error( |
| 176 | self, message: str, line: int, column: int, *, blocker: bool = False, code: str |
| 177 | ) -> None: |
| 178 | """Report an error at a specific location.""" |
| 179 | self.errors.append( |
| 180 | {"line": line, "column": column, "message": message, "blocker": blocker, "code": code} |
| 181 | ) |
| 182 | |
| 183 | |
| 184 | def native_parse( |
no outgoing calls
searching dependent graphs…