MCPcopy Index your code
hub / github.com/python/cpython / make_syntax_error

Method make_syntax_error

Tools/peg_generator/pegen/parser.py:292–294  ·  view source on GitHub ↗
(self, message: str, filename: str = "<unknown>")

Source from the content-addressed store, hash-verified

290 return not ok
291
292 def make_syntax_error(self, message: str, filename: str = "<unknown>") -> SyntaxError:
293 tok = self._tokenizer.diagnose()
294 return SyntaxError(message, (filename, tok.start[0], 1 + tok.start[1], tok.line))
295
296
297def simple_parser_main(parser_class: type[Parser]) -> None:

Callers 15

parse_filesFunction · 0.95
io_effectMethod · 0.95
cache_effectMethod · 0.95
stack_effectMethod · 0.95
uopsMethod · 0.95
uopMethod · 0.95
family_defMethod · 0.95
flagsMethod · 0.95
pseudo_defMethod · 0.95
membersMethod · 0.95
stmtMethod · 0.95
macro_ifMethod · 0.95

Calls 1

diagnoseMethod · 0.80

Tested by 1

run_parserFunction · 0.36