()
| 335 | return curr_token, dct |
| 336 | |
| 337 | def parse_graph(): |
| 338 | curr_token, dct = parse_kv(next(tokens)) |
| 339 | if curr_token.category is not None: # EOF |
| 340 | unexpected(curr_token, "EOF") |
| 341 | if "graph" not in dct: |
| 342 | raise EasyGraphError("input contains no graph") |
| 343 | graph = dct["graph"] |
| 344 | if isinstance(graph, list): |
| 345 | raise EasyGraphError("input contains more than one graph") |
| 346 | return graph |
| 347 | |
| 348 | tokens = tokenize() |
| 349 | graph = parse_graph() |
no test coverage detected