Skip to content

Commit

Permalink
fix: FLOAT of lexer
Browse files Browse the repository at this point in the history
  • Loading branch information
beizhansl committed Mar 31, 2024
1 parent cfcc526 commit a1313e2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quafu/qfasm/qfasm_lexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def t_INCLUDE(self, _):
return self.lexer.token()

def t_FLOAT(self, t):
r"(([1-9]\d*\.\d*)|(0\.\d*[1-9]\d*))"
r"([0-9]\d*\.\d*)"
t.value = float(t.value)
return t

Expand Down

0 comments on commit a1313e2

Please sign in to comment.