You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
finally decide to just do it... gonna supercede #315
This PR refactors the AST lowering framework to make it more generic. So
that other langauge AST can reuse the framework to generate SSA IR (e.g
QASM2, etc.). We will also try to clean up the APIs in the process.
### Highlights
- new error message of lowering
<img width="682" alt="image"
src="https://github.com/user-attachments/assets/b5591b7a-a3dc-44fa-b977-538a2049d691"
/>
- removing the `push_frame` and `pop_frame` in `lowering.State`. Now you
can just write
```python
with state.frame(stmts) as body_frame:
...
```
The main changes are mostly splitting the APIs into several classes. We
still need to improve the precision of error reports here, but we will
do that in a few following PRs.
cc: @weinbe58
0 commit comments