Skip to content

Commit 97c4d67

Browse files
committed
Allows print COLOR without a separator before.
This is more consistent with TAB() and RTAB().
1 parent 2722b61 commit 97c4d67

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/syntax/basic.syn

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,16 +288,16 @@ STRING_FUNCTIONS:
288288
# - PRINT separator or an end-of-line if not given:
289289
PRINT_SEP_EOL:
290290
"Tab" T_EXPR emit TOK_PRINT_TAB
291-
# Right-TAB is complicated because we need to apply it to the *next*
291+
# Right-TAB and COLOR are complicated because we need to apply it to the *next*
292292
# parameter, so we read that parameter and the next optional separator:
293293
"RTab" T_EXPR emit { TOK_BYTE_POKE, PRINT_ARG } PRINT_ONE emit { TOK_PRINT_RTAB } PRINT_SEP_EOL
294+
"Color" T_EXPR emit { TOK_BYTE_POKE, PRINT_ARG } PRINT_ONE emit { TOK_PRINT_COLOR_STR } PRINT_SEP_EOL
294295
"," emit { TOK_BYTE, 10, TOK_PRINT_TAB }
295296
";"
296297
E_EOL emit { TOK_BYTE_PUT, ATEOL }
297298

298299
# - One item to print, converted to string:
299300
PRINT_ONE_STR:
300-
"Color" T_EXPR emit { TOK_BYTE_POKE, PRINT_ARG } PRINT_ONE emit TOK_PRINT_COLOR_STR
301301
PRINT_ONE emit TOK_PRINT_STR
302302
pass
303303

0 commit comments

Comments
 (0)