lang: ast: move block parser state to separate header file

this allows other parsers to specify what kind of token should end the
block.
This commit is contained in:
2024-11-28 16:56:25 +00:00
parent 6a765c4f2b
commit 7530dd36a2
2 changed files with 49 additions and 8 deletions

12
lang/ast/block.h Normal file
View File

@@ -0,0 +1,12 @@
#ifndef _AST_BLOCK_H_
#define _AST_BLOCK_H_
#include "ctx.h"
struct block_parser_state {
struct parser_state s_base;
bool s_single_expr;
unsigned int s_terminator;
};
#endif