-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reimplement Parser #2149
base: main
Are you sure you want to change the base?
Reimplement Parser #2149
Conversation
80a46cc
to
348680f
Compare
dced819
to
cec25d5
Compare
Index, | ||
} | ||
|
||
// TODO: This seems to be an unnecessary wrapper. |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
Keyword(Keyword), | ||
} | ||
|
||
// TODO: This seems to be an unnecessary wrapper. |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
This PR adds our own implementation of an OpenQASM3 parser to the `compiler/qsc_qasm3` directory.
Co-authored-by: Oscar Puente <[email protected]>
This PR doesn't change any behavior. It just touches the Display functions in the QASM3 parser to make unit tests easier to read.
Previously assignments and binary assignments were valid in any part of the expression tree. This PR makes Assign and AssignOp valid only in expression statements.
This PR turns assignment into a StmtKind (it was a ExprKind before).
This PR: 1. Fixes a bug with block statements 2. Adds grammar docstrings to the QASM3 parser. 3. Adds the invalid tests in the reference parser to make sure they are invalid for our parser as well.
rc::Rc, | ||
}; | ||
|
||
// TODO: Profile this with iai-callgrind in a large OpenQASM3 |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
|
||
let expr = if matches!(ty, Type::Complex(..)) { | ||
if is_complex_binop_supported(op) { | ||
// TODO: How do we handle complex binary expressions? |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
) | ||
} | ||
|
||
// TODO: which these are parsed as different types, they are effectively the same |
Check notice
Code scanning / devskim
A "TODO" or similar was left in source code, possibly indicating incomplete functionality Note
Lexing
Parsing
Lowering
Compiling
out of scope: