MCPcopy Create free account
hub / github.com/easy-graph/Easy-Graph / unexpected

Function unexpected

easygraph/readwrite/gml.py:263–266  ·  view source on GitHub ↗
(curr_token, expected)

Source from the content-addressed store, hash-verified

261 yield Token(None, None, lineno + 1, 1) # EOF
262
263 def unexpected(curr_token, expected):
264 category, value, lineno, pos = curr_token
265 value = repr(value) if value is not None else "EOF"
266 raise EasyGraphError(f"expected {expected}, found {value} at ({lineno}, {pos})")
267
268 def consume(curr_token, category, expected):
269 if curr_token.category == category:

Callers 3

consumeFunction · 0.85
parse_kvFunction · 0.85
parse_graphFunction · 0.85

Calls 1

EasyGraphErrorClass · 0.90

Tested by

no test coverage detected