Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/libzxbpp/zxbasmpplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def t_INITIAL_CHAR(self, t):
return t

def t_INITIAL_TOKEN(self, t):
r"[][%'`,.:$()*/<>~&|+^-]"
r"[][}{%'`,.:$()*/<>~&|+^-]"
return t

def t_prepro_define_defargs_defargsopt_defexpr_pragma_NEWLINE(self, t):
Expand Down
2 changes: 1 addition & 1 deletion src/libzxbpp/zxbpplex.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ def t_asm_CHAR(self, t):
return t

def t_asm_TOKEN(self, t):
r"[]['`.:$*/+<>|&~%^-]"
r"[][}{'`.:$*/+<>|&~%^-]"
return t

def t_INITIAL_CONTINUE(self, t):
Expand Down
40 changes: 40 additions & 0 deletions tests/functional/asm_tokens.asm
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
org 32768
__START_PROGRAM:
di
push ix
push iy
exx
push hl
exx
ld hl, 0
add hl, sp
ld (__CALL_BACK__), hl
ei
jp __MAIN_PROGRAM__
ZXBASIC_USER_DATA:
; Defines USER DATA Length in bytes
ZXBASIC_USER_DATA_LEN EQU ZXBASIC_USER_DATA_END - ZXBASIC_USER_DATA
.__LABEL__.ZXBASIC_USER_DATA_LEN EQU ZXBASIC_USER_DATA_LEN
.__LABEL__.ZXBASIC_USER_DATA EQU ZXBASIC_USER_DATA
ZXBASIC_USER_DATA_END:
__MAIN_PROGRAM__:
#line 0
ld a, {{macro_value}}
#line 1
ld hl, 0
ld b, h
ld c, l
__END_PROGRAM:
di
ld hl, (__CALL_BACK__)
ld sp, hl
exx
pop hl
exx
pop iy
pop ix
ei
ret
__CALL_BACK__:
DEFW 0
END
4 changes: 4 additions & 0 deletions tests/functional/asm_tokens.bas
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
asm
ld a, {{macro_value}}
end asm