forked from Qiskit/openqasm3_parser
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support prefixes 0X, 0O, 0B for hex, octal, binary literals
Closes Qiskit#226 Previously, literals with prefix `0x` were parsed and analyzed correctly. But literals with prefix `0X` were analyzed as value `0`. This is now fixed. Prefixes `0B` and `0O` were broken in the same way and are now fixed. This fix also uncovers a bug that will be opened and fixed separately: Illegal (nonsense) integer literals, with prefixes such as 0Q will be analyzed as valid, decimal, literals. Instead they should cause an error to be logged. A lex, or possibly parse, error.
- Loading branch information
Showing
2 changed files
with
75 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters