From 22649829cd7b6d8f5e7b630167b1a928e5275f05 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 3 May 2026 12:57:43 +0900 Subject: chore: rename variables --- src/parse.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src') diff --git a/src/parse.c b/src/parse.c index f7fec94..b95bc1e 100644 --- a/src/parse.c +++ b/src/parse.c @@ -1762,7 +1762,7 @@ static AstNode* parse_init_declarator(Parser* p, Type* ty) { // 'struct' TODO attribute-specifier-sequence? identifier? '{' member-declaration-list '}' // 'struct' TODO attribute-specifier-sequence? identifier static Type* parse_struct_specifier(Parser* p) { - SourceLocation struct_kw_pos = peek_token(p)->loc; + SourceLocation struct_kw_loc = current_location(p); next_token(p); const Token* name; @@ -1772,7 +1772,7 @@ static Type* parse_struct_specifier(Parser* p) { Token* anonymous_token = calloc(1, sizeof(Token)); anonymous_token->kind = TokenKind_ident; anonymous_token->value.string = anonymous_name; - anonymous_token->loc = struct_kw_pos; + anonymous_token->loc = struct_kw_loc; name = anonymous_token; } else { name = parse_ident(p); @@ -1823,7 +1823,7 @@ static Type* parse_struct_specifier(Parser* p) { // 'union' TODO attribute-specifier-sequence? identifier? '{' member-declaration-list '}' // 'union' TODO attribute-specifier-sequence? identifier static Type* parse_union_specifier(Parser* p) { - SourceLocation union_kw_pos = peek_token(p)->loc; + SourceLocation union_kw_loc = current_location(p); next_token(p); const Token* name; @@ -1833,7 +1833,7 @@ static Type* parse_union_specifier(Parser* p) { Token* anonymous_token = calloc(1, sizeof(Token)); anonymous_token->kind = TokenKind_ident; anonymous_token->value.string = anonymous_name; - anonymous_token->loc = union_kw_pos; + anonymous_token->loc = union_kw_loc; name = anonymous_token; } else { name = parse_ident(p); @@ -2133,7 +2133,7 @@ static AstNode* parse_member_declarator(Parser* p, Type* base_ty) { // 'enum' TODO attribute-specifier-sequence? identifier? TODO enum-type-specifier? '{' enumerator-list ','? '}' // 'enum' identifier TODO enum-type-specifier? static Type* parse_enum_specifier(Parser* p) { - SourceLocation enum_kw_pos = peek_token(p)->loc; + SourceLocation enum_kw_loc = current_location(p); next_token(p); const Token* name; @@ -2143,7 +2143,7 @@ static Type* parse_enum_specifier(Parser* p) { Token* anonymous_token = calloc(1, sizeof(Token)); anonymous_token->kind = TokenKind_ident; anonymous_token->value.string = anonymous_name; - anonymous_token->loc = enum_kw_pos; + anonymous_token->loc = enum_kw_loc; name = anonymous_token; } else { name = parse_ident(p); -- cgit v1.3.1