Implement STRRIN, like STRIN but searching from the right

This commit is contained in:
Rangi
2020-12-09 20:08:26 -05:00
committed by Eldred Habert
parent 3e4c2fe712
commit 58739b0bf2
6 changed files with 40 additions and 2 deletions

View File

@@ -195,6 +195,7 @@ static struct KeywordMapping {
{"STRCMP", T_OP_STRCMP},
{"STRIN", T_OP_STRIN},
{"STRRIN", T_OP_STRRIN},
{"STRSUB", T_OP_STRSUB},
{"STRLEN", T_OP_STRLEN},
{"STRCAT", T_OP_STRCAT},
@@ -472,7 +473,7 @@ struct KeywordDictNode {
uint16_t children[0x60 - ' '];
struct KeywordMapping const *keyword;
/* Since the keyword structure is invariant, the min number of nodes is known at compile time */
} keywordDict[338] = {0}; /* Make sure to keep this correct when adding keywords! */
} keywordDict[341] = {0}; /* Make sure to keep this correct when adding keywords! */
/* Convert a char into its index into the dict */
static inline uint8_t dictIndex(char c)