(out: CWriter, tkn_iter: TokenIterator, end: str)
| 76 | |
| 77 | |
| 78 | def emit_to(out: CWriter, tkn_iter: TokenIterator, end: str) -> Token: |
| 79 | parens = 0 |
| 80 | for tkn in tkn_iter: |
| 81 | if tkn.kind == end and parens == 0: |
| 82 | return tkn |
| 83 | if tkn.kind == "LPAREN": |
| 84 | parens += 1 |
| 85 | if tkn.kind == "RPAREN": |
| 86 | parens -= 1 |
| 87 | out.emit(tkn) |
| 88 | raise analysis_error(f"Expecting {end}. Reached end of file", tkn) |
| 89 | |
| 90 | |
| 91 | ReplacementFunctionType = Callable[ |
no test coverage detected
searching dependent graphs…