Skip to content
This repository has been archived by the owner on May 21, 2024. It is now read-only.

Commit

Permalink
Merge pull request boriel-basic#689 from boriel/bugfix/0x_hexa_not_su…
Browse files Browse the repository at this point in the history
…pported_in_ASM

fix: 0xff hexa not supported in asm
  • Loading branch information
boriel committed Nov 7, 2023
2 parents b710f08 + 56c0604 commit 7b39e82
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/zxbasm/asmlex.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ def t_CHAR(self, t):
return t

def t_HEXA(self, t):
r"([0-9](_?[0-9a-fA-F])*[hH])|(\$[0-9a-fA-F](_?[0-9a-fA-F])*)|(0x[0-9a-fA-F](_?[0-9a-dA-F])*)"
r"([0-9](_?[0-9a-fA-F])*[hH])|(\$[0-9a-fA-F](_?[0-9a-fA-F])*)|(0x[0-9a-fA-F](_?[0-9a-fA-F])*)"

if t.value[:2] == "0x":
t.value = t.value[2:] # Remove initial 0x
Expand Down
1 change: 1 addition & 0 deletions tests/functional/hex_num1.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ld a, 0xff
1 change: 1 addition & 0 deletions tests/functional/hex_num1.bin
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
>�

0 comments on commit 7b39e82

Please sign in to comment.