Prevent ELIF or ELSE after an ELSE

Fixes #749
This commit is contained in:
Rangi
2021-02-24 21:19:08 -05:00
committed by Eldred Habert
parent dd892d61d8
commit d4028fff10
12 changed files with 163 additions and 45 deletions

View File

@@ -69,6 +69,14 @@ enum LexerMode {
void lexer_SetMode(enum LexerMode mode);
void lexer_ToggleStringExpansion(bool enable);
uint32_t lexer_GetIFDepth(void);
void lexer_IncIFDepth(void);
void lexer_DecIFDepth(void);
bool lexer_RanIFBlock(void);
bool lexer_ReachedELSEBlock(void);
void lexer_RunIFBlock(void);
void lexer_ReachELSEBlock(void);
struct CaptureBody {
uint32_t lineNo;
char *body;