From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 4FcYKOHkDGcfMwEA62LTzQ:P1 (envelope-from ) for ; Mon, 14 Oct 2024 11:31:13 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id 4FcYKOHkDGcfMwEA62LTzQ (envelope-from ) for ; Mon, 14 Oct 2024 11:31:13 +0200 X-Envelope-To: patches@johnnyrichard.com Authentication-Results: aspmx1.migadu.com; none Received: from mail-a.sr.ht (mail-a.sr.ht [46.23.81.152]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 8BD9737D04 for ; Mon, 14 Oct 2024 11:31:13 +0200 (CEST) DKIM-Signature: a=rsa-sha256; bh=YlvNYbUgddaKmB3XWaXrjZ0U0xzMyLgMh4gbX8lkgDY=; c=simple/simple; d=lists.sr.ht; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Unsubscribe:List-Subscribe:List-Archive:List-Post:List-ID; q=dns/txt; s=20240113; t=1728898262; v=1; b=SZDRwvqe2hoQJ3f8S3XuUQORHQtH1Vdj4+xo0qPw5GCqU67phx6zHRGWe6BlL6lnfvZgiZMo kzsMrUP4PkU65WhSsZljl1LRMfKvjl2qpv+iKXVnv3CWWlcCMxqX6CMGhD3jRRcMoeaiMOvNp8n cp4KP0IWbtNiBFpb+jLZYV5ovGa+ZfuXofe2eijo+JqMEp6ztlpPV14lBtqfB3Rt7zYRg1LBgmH ylJ08iChcgxiCIy012j0NgflahF9LfWP3BrVK6rGkOrKEYy2MbKj5wBBmHrrJbBodqqabdBOopD jUAux+NaNFL8c+MgE3pdKX+G4kJwH0LjETyxUATul7cdw== Received: from lists.sr.ht (unknown [46.23.81.154]) by mail-a.sr.ht (Postfix) with ESMTPSA id D4F162017A for ; Mon, 14 Oct 2024 09:31:02 +0000 (UTC) Received: from out-180.mta0.migadu.com (out-180.mta0.migadu.com [91.218.175.180]) by mail-a.sr.ht (Postfix) with ESMTPS id 3BBFA200DD for <~johnnyrichard/olang-devel@lists.sr.ht>; Mon, 14 Oct 2024 09:31:02 +0000 (UTC) X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=johnnyrichard.com; s=key1; t=1728898261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vqLVGSgNqfq5AdK75xyv7Y+AGxNRpCGcABy6sEr6hO8=; b=rw4We0Q06slVB+s+Q2Uek+Nfga31rUFfkT+o4/8Z/fRpZjV6BYERqeOaI4pmOgk/LsfDcB JZ15UYfYUmZ2GvzzIRSrkE2GKoHltZxDxzNkGEAzGaPztCj9AaG7FxRZ+WoLgcZnGqzPox sxh9N9j0E/Eza6WbhOauOqgXP7MFbjSIIW275xxF2JSJMZEzDKk2bI2zug0I1YY6BaXvqL TrXnK1DUlh+Qgks0AYYDGQNuffoTeYXR0svb4PmNG+/UfxLV684KpBQc7YV5SDPROjJjdR v+jyM4oVe76Qk/1cc5VeadbVaCrfxd/ah8gfmOtqgIkNiO2sfDP5eIPgqmyZiw== From: Johnny Richard To: ~johnnyrichard/olang-devel@lists.sr.ht Cc: Johnny Richard Subject: [PATCH olang v1 1/2] parser: rename factor to primary_expr Date: Mon, 14 Oct 2024 13:29:47 +0200 Message-ID: <20241014113011.108922-2-johnny@johnnyrichard.com> In-Reply-To: <20241014113011.108922-1-johnny@johnnyrichard.com> References: <20241014113011.108922-1-johnny@johnnyrichard.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Sourcehut-Patchset-Status: UNKNOWN List-Unsubscribe: List-Subscribe: List-Archive: Archived-At: List-Post: List-ID: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel.lists.sr.ht> Sender: ~johnnyrichard/olang-devel <~johnnyrichard/olang-devel@lists.sr.ht> X-Migadu-Country: NL X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -4.00 X-Spam-Score: -4.00 X-Migadu-Queue-Id: 8BD9737D04 X-Migadu-Scanner: mx10.migadu.com X-TUID: aRPfb4c5zWi9 Signed-off-by: Johnny Richard --- src/parser.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/parser.c b/src/parser.c index 4282f0a..8b103df 100644 --- a/src/parser.c +++ b/src/parser.c @@ -65,7 +65,7 @@ static ast_node_t * parser_parse_expr(parser_t *parser); static ast_node_t * -parser_parse_factor(parser_t *parser); +parser_parse_primary_expr(parser_t *parser); static void skip_line_feeds(lexer_t *lexer); @@ -247,7 +247,7 @@ parser_parse_expr_1(parser_t *parser, ast_node_t *lhs, size_t prev_precedence) token_t token_op; lexer_next_token(parser->lexer, &token_op); - ast_node_t *rhs = parser_parse_factor(parser); + ast_node_t *rhs = parser_parse_primary_expr(parser); if (rhs == NULL) { return NULL; } @@ -278,7 +278,7 @@ parser_parse_expr_1(parser_t *parser, ast_node_t *lhs, size_t prev_precedence) static ast_node_t * parser_parse_expr(parser_t *parser) { - ast_node_t *lhs = parser_parse_factor(parser); + ast_node_t *lhs = parser_parse_primary_expr(parser); if (lhs == NULL) { return NULL; } @@ -287,7 +287,7 @@ parser_parse_expr(parser_t *parser) } static ast_node_t * -parser_parse_factor(parser_t *parser) +parser_parse_primary_expr(parser_t *parser) { token_t token; lexer_next_token(parser->lexer, &token); @@ -316,7 +316,7 @@ parser_parse_factor(parser_t *parser) case TOKEN_DASH: case TOKEN_TILDE: case TOKEN_BANG: { - ast_node_t *expr = parser_parse_factor(parser); + ast_node_t *expr = parser_parse_primary_expr(parser); if (expr == NULL) { return NULL; } -- 2.46.0