Implement BREAK to exit REPT and FOR loops

Fixes #684
This commit is contained in:
Rangi
2021-01-03 22:00:02 -05:00
committed by Eldred Habert
parent 7ce5cf1595
commit 62bea23c49
13 changed files with 204 additions and 7 deletions

View File

@@ -75,6 +75,7 @@ void fstk_RunMacro(char const *macroName, struct MacroArgs *args);
void fstk_RunRept(uint32_t count, int32_t nReptLineNo, char *body, size_t size);
void fstk_RunFor(char const *symName, int32_t start, int32_t stop, int32_t step,
int32_t reptLineNo, char *body, size_t size);
bool fstk_Break(void);
void fstk_Init(char const *mainPath, size_t maxRecursionDepth);

View File

@@ -56,7 +56,8 @@ enum LexerMode {
LEXER_NORMAL,
LEXER_RAW,
LEXER_SKIP_TO_ELIF,
LEXER_SKIP_TO_ENDC
LEXER_SKIP_TO_ENDC,
LEXER_SKIP_TO_ENDR
};
void lexer_SetMode(enum LexerMode mode);