Change name Scratch_Scope to Scoped_Arena
This commit is contained in:
@@ -225,7 +225,7 @@ parse_init_stmt(Ast_Expr *expr) {
|
||||
|
||||
CORE_Static Ast_Call *
|
||||
parse_expr_call(Ast_Expr *left, Token_Kind close_kind) {
|
||||
Scratch_Scope scratch(pctx->scratch);
|
||||
Scoped_Arena scratch(pctx->scratch);
|
||||
Token *pos = token_get();
|
||||
Array<Ast_Call_Item *> exprs = {scratch.arena};
|
||||
|
||||
@@ -279,7 +279,7 @@ parse_stmt_scope(Ast_Scope *scope_defined_outside = 0) {
|
||||
if (token_expect(OPEN_SCOPE)) { // @todo: Fix error message here, it doesn't show proper token context
|
||||
Token *token_block = token_get();
|
||||
|
||||
Scratch_Scope scratch(pctx->scratch);
|
||||
Scoped_Arena scratch(pctx->scratch);
|
||||
if (!scope_defined_outside) scope = begin_stmt_scope(scratch.arena, token_block);
|
||||
do {
|
||||
Token *token = token_get();
|
||||
@@ -499,7 +499,7 @@ parse_parameter_list(Arena *arena) {
|
||||
|
||||
CORE_Static Ast_Lambda *
|
||||
parse_lambda(Token *token) {
|
||||
Scratch_Scope scratch(pctx->scratch);
|
||||
Scoped_Arena scratch(pctx->scratch);
|
||||
|
||||
Array<Ast_Decl *> params = parse_parameter_list(scratch.arena);
|
||||
Array<Ast_Expr *> ret = {scratch.arena};
|
||||
@@ -723,7 +723,7 @@ parse_assign_expr() {
|
||||
|
||||
CORE_Static Ast_Decl *
|
||||
parse_struct(Token *pos, Ast_Kind kind) {
|
||||
Scratch_Scope scratch(pctx->scratch);
|
||||
Scoped_Arena scratch(pctx->scratch);
|
||||
|
||||
Array<Ast_Decl *> params = {};
|
||||
if (token_match(TK_OpenParen)) {
|
||||
@@ -758,7 +758,7 @@ parse_struct(Token *pos, Ast_Kind kind) {
|
||||
|
||||
CORE_Static Ast_Decl *
|
||||
parse_enum(Token *pos) {
|
||||
Scratch_Scope scratch(pctx->scratch);
|
||||
Scoped_Arena scratch(pctx->scratch);
|
||||
Ast_Expr *typespec = parse_optional_type();
|
||||
Token *flag = token_match_pound(pctx->intern_flag);
|
||||
|
||||
@@ -836,7 +836,7 @@ register_ast_file(Token *pos, String absolute_file_path, Ast_Module *module, B32
|
||||
|
||||
CORE_Static Intern_String
|
||||
preprocess_filename(Token *token_filename) {
|
||||
Scratch_Scope _scope(pctx->scratch);
|
||||
Scoped_Arena _scope(pctx->scratch);
|
||||
String filename = token_filename->intern_val.s;
|
||||
Array<String_Replace> replace = {pctx->scratch};
|
||||
replace.add({"$OS"_s, OS_NAME});
|
||||
@@ -994,7 +994,7 @@ parse_decl(B32 is_global) {
|
||||
CORE_Static void
|
||||
parse_file(Ast_File *file) {
|
||||
assert(file);
|
||||
Scratch_Scope scratch(pctx->scratch);
|
||||
Scoped_Arena scratch(pctx->scratch);
|
||||
|
||||
if (!file->filecontent.len) {
|
||||
file->filecontent = os_read_file(pctx->perm, file->absolute_file_path);
|
||||
|
||||
Reference in New Issue
Block a user