|
Ran
|
Jobs
1
|
Files
884
|
Run time
2min
|
Badge
README BADGES
|
push
github
Fix digit escaping in OpenQASM 3 identifier (#15305) (#15650) * Fix digit escaping in OpenQASM 3 identifier The previous regex used `\w` as the match for an initial id character, and `[\w\d]` for continuations. Actually, `\w` matches any character that `str.isalnum` returns `True` plus the underscore, which includes all Unicode characters in the "digit" class, so is a superset of `\d`. The match `\d` is only the Unicode group `[Nd]` (decimal digits), which is not as complete as the entire `[N?]` set, so we can't even use variants of `[^\W\d_]` or the like to get something usable; we'd have to pull in the third-party `regex` package or the like to make an exact match. This instead causes the Qiskit exporter to allow only a subset of valid OQ3 identifiers on export in lieu of _complete_ matching. Additionally, we now do not accidentally include digits in the allowed set of initial characters for IDs (but do allow then in continuations). * Add tests of multiple consecutive characters * Fix broken test (cherry picked from commit cc675b6d3) Co-authored-by: Jake Lishman <jake.lishman@ibm.com>
4 of 4 new or added lines in 1 file covered. (100.0%)
13 existing lines in 3 files now uncovered.96631 of 109385 relevant lines covered (88.34%)
1202908.72 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
82.37 |
0.0% | crates/circuit/src/parameter/parameter_expression.rs |
| 6 |
91.52 |
-0.77% | crates/qasm2/src/lex.rs |
| 6 |
96.21 |
-0.47% | crates/qasm2/src/parse.rs |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 21710567018.1 | 884 |
88.34 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line |
|---|