mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 18:22:07 +00:00
@@ -287,7 +287,9 @@ static struct KeywordMapping {
|
|||||||
{"PUSHO", T_POP_PUSHO},
|
{"PUSHO", T_POP_PUSHO},
|
||||||
{"POPO", T_POP_POPO},
|
{"POPO", T_POP_POPO},
|
||||||
|
|
||||||
{"OPT", T_POP_OPT}
|
{"OPT", T_POP_OPT},
|
||||||
|
|
||||||
|
{".", T_PERIOD},
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool isWhitespace(int c)
|
static bool isWhitespace(int c)
|
||||||
@@ -576,7 +578,7 @@ struct KeywordDictNode {
|
|||||||
uint16_t children[0x60 - ' '];
|
uint16_t children[0x60 - ' '];
|
||||||
struct KeywordMapping const *keyword;
|
struct KeywordMapping const *keyword;
|
||||||
/* Since the keyword structure is invariant, the min number of nodes is known at compile time */
|
/* Since the keyword structure is invariant, the min number of nodes is known at compile time */
|
||||||
} keywordDict[350] = {0}; /* Make sure to keep this correct when adding keywords! */
|
} keywordDict[351] = {0}; /* Make sure to keep this correct when adding keywords! */
|
||||||
|
|
||||||
/* Convert a char into its index into the dict */
|
/* Convert a char into its index into the dict */
|
||||||
static inline uint8_t dictIndex(char c)
|
static inline uint8_t dictIndex(char c)
|
||||||
|
|||||||
@@ -460,6 +460,7 @@ enum {
|
|||||||
%token <nConstValue> T_NUMBER "number"
|
%token <nConstValue> T_NUMBER "number"
|
||||||
%token <tzString> T_STRING "string"
|
%token <tzString> T_STRING "string"
|
||||||
|
|
||||||
|
%token T_PERIOD "."
|
||||||
%token T_COMMA ","
|
%token T_COMMA ","
|
||||||
%token T_COLON ":"
|
%token T_COLON ":"
|
||||||
%token T_LBRACK "[" T_RBRACK "]"
|
%token T_LBRACK "[" T_RBRACK "]"
|
||||||
|
|||||||
5
test/asm/period.asm
Normal file
5
test/asm/period.asm
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
section "period", rom0
|
||||||
|
|
||||||
|
global1: db 1
|
||||||
|
.local db 2
|
||||||
|
. db 3
|
||||||
3
test/asm/period.err
Normal file
3
test/asm/period.err
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ERROR: period.asm(5):
|
||||||
|
syntax error, unexpected .
|
||||||
|
error: Assembly aborted (1 errors)!
|
||||||
3
test/asm/period.simple.err
Normal file
3
test/asm/period.simple.err
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
ERROR: period.asm(5):
|
||||||
|
syntax error
|
||||||
|
error: Assembly aborted (1 errors)!
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
SECTION "sec", ROM0
|
|
||||||
foo:
|
|
||||||
add sp, .
|
|
||||||
3
test/asm/undefined-local.asm
Normal file
3
test/asm/undefined-local.asm
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
SECTION "sec", ROM0
|
||||||
|
foo:
|
||||||
|
add sp, .bar ; rgblink gives an "Unknown symbol" error here
|
||||||
0
test/asm/undefined-local.out
Normal file
0
test/asm/undefined-local.out
Normal file
Reference in New Issue
Block a user