Rename lexer_DeleteState to lexer_CleanupState

This commit is contained in:
Rangi42
2024-02-28 21:01:49 -05:00
committed by Sylvie
parent 17df94c75b
commit d1fa5ccd4d
3 changed files with 3 additions and 3 deletions

View File

@@ -122,7 +122,7 @@ bool lexer_OpenFile(struct LexerState &state, char const *path);
void lexer_OpenFileView(struct LexerState &state, char const *path, char *buf, size_t size, void lexer_OpenFileView(struct LexerState &state, char const *path, char *buf, size_t size,
uint32_t lineNo); uint32_t lineNo);
void lexer_RestartRept(uint32_t lineNo); void lexer_RestartRept(uint32_t lineNo);
void lexer_DeleteState(struct LexerState &state); void lexer_CleanupState(struct LexerState &state);
void lexer_Init(void); void lexer_Init(void);
void lexer_SetMode(enum LexerMode mode); void lexer_SetMode(enum LexerMode mode);
void lexer_ToggleStringExpansion(bool enable); void lexer_ToggleStringExpansion(bool enable);

View File

@@ -237,7 +237,7 @@ bool yywrap(void)
contextStack.pop(); contextStack.pop();
lexer_DeleteState(oldContext.lexerState); lexer_CleanupState(oldContext.lexerState);
// Restore args if a macro (not REPT) saved them // Restore args if a macro (not REPT) saved them
if (oldContext.fileInfo->type == NODE_MACRO) { if (oldContext.fileInfo->type == NODE_MACRO) {
macro_FreeArgs(macro_GetCurrentArgs()); macro_FreeArgs(macro_GetCurrentArgs());

View File

@@ -451,7 +451,7 @@ void lexer_RestartRept(uint32_t lineNo)
lexerState->lineNo = lineNo; lexerState->lineNo = lineNo;
} }
void lexer_DeleteState(struct LexerState &state) void lexer_CleanupState(struct LexerState &state)
{ {
// A big chunk of the lexer state soundness is the file stack ("fstack"). // A big chunk of the lexer state soundness is the file stack ("fstack").
// Each context in the fstack has its own *unique* lexer state; thus, we always guarantee // Each context in the fstack has its own *unique* lexer state; thus, we always guarantee