Skip to content

Commit 1e8a9a4

Browse files
committed
feat: ensure PRINTs output actual normalized bool
1 parent 0a5ae81 commit 1e8a9a4

4 files changed

Lines changed: 10 additions & 4 deletions

File tree

src/parsetab/tabs.dbm.bak

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'zxbpp', (0, 67003)
22
'asmparse', (67072, 233956)
33
'zxnext_asmparse', (301056, 259034)
4-
'zxbparser', (560128, 641187)
4+
'zxbparser', (560128, 641214)

src/parsetab/tabs.dbm.dat

27 Bytes
Binary file not shown.

src/parsetab/tabs.dbm.dir

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
'zxbpp', (0, 67003)
22
'asmparse', (67072, 233956)
33
'zxnext_asmparse', (301056, 259034)
4-
'zxbparser', (560128, 641187)
4+
'zxbparser', (560128, 641214)

src/zxbc/zxbparser.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1983,9 +1983,15 @@ def p_print_sentence(p):
19831983
PRINT_IS_USED = True
19841984

19851985

1986+
def p_print_elem_expr(p):
1987+
"""print_elem : expr"""
1988+
p[0] = p[1]
1989+
if p[1] is not None and p[1].type_ == TYPE.boolean:
1990+
p[0] = make_typecast(TYPE.ubyte, p[1], p.lineno(1))
1991+
1992+
19861993
def p_print_list_expr(p):
1987-
"""print_elem : expr
1988-
| print_at
1994+
"""print_elem : print_at
19891995
| print_tab
19901996
| attr
19911997
| BOLD expr

0 commit comments

Comments
 (0)