Skip to content

Commit 9b8162e

Browse files
committed
fbc: PEEK, POKE, and SWAP name resolution
- PEEK, POKE, and SWAP are now quirk words instead of keywords allowing these names to be used as member procedure names
1 parent 42d7102 commit 9b8162e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ Version 1.20.0
2424
- rtlib: When array out of bounds check files, show variable/field name, index, lbound, and ubound in the error message
2525
- fbc: '-exx' enables '-earraydims' by default to error on wrong number of array dimensions or unallocated arrays breaking previous use of @array(0,...) = NULL to detect unallocated arrays
2626
- fbc: set bit value '__FB_ERR__' = &h400 if '-earraydims' is enabled
27+
- PEEK, POKE, and SWAP are now quirk words instead of keywords allowing these names to be used as member procedure names
2728

2829
[added]
2930
- x86_64: optimize SHL MOD INTDIV to use 32-bit operation when result will be converted to long/ulong

src/compiler/symb-keyword.bas

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,9 @@ dim shared kwdTb( 0 to FB_TOKENS-1 ) as SYMBKWD => _
128128
( @"IS" , FB_TK_IS , FB_TKCLASS_KEYWORD ), _
129129
( @"USING" , FB_TK_USING , FB_TKCLASS_KEYWORD ), _
130130
( @"LEN" , FB_TK_LEN , FB_TKCLASS_QUIRKWD ), _
131-
( @"PEEK" , FB_TK_PEEK , FB_TKCLASS_KEYWORD ), _
132-
( @"POKE" , FB_TK_POKE , FB_TKCLASS_KEYWORD ), _
133-
( @"SWAP" , FB_TK_SWAP , FB_TKCLASS_KEYWORD ), _
131+
( @"PEEK" , FB_TK_PEEK , FB_TKCLASS_QUIRKWD ), _
132+
( @"POKE" , FB_TK_POKE , FB_TKCLASS_QUIRKWD ), _
133+
( @"SWAP" , FB_TK_SWAP , FB_TKCLASS_QUIRKWD ), _
134134
( @"COMMON" , FB_TK_COMMON , FB_TKCLASS_KEYWORD ), _
135135
( @"ENUM" , FB_TK_ENUM , FB_TKCLASS_KEYWORD ), _
136136
( @"ASM" , FB_TK_ASM , FB_TKCLASS_KEYWORD , KWD_OPTION_NO_QB ), _

0 commit comments

Comments
 (0)