From a002556420b03f6a97ac1876f5f178889336cdc9 Mon Sep 17 00:00:00 2001 From: Eric-Paul Ickhorn Date: Tue, 28 Nov 2023 16:21:50 +0100 Subject: [PATCH] Renamed outlines to sets in the AST --- code/inc/ast.h | 18 +++++++++--------- code/src/ast.c | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/code/inc/ast.h b/code/inc/ast.h index 0a19ad7..1e78c44 100644 --- a/code/inc/ast.h +++ b/code/inc/ast.h @@ -46,25 +46,25 @@ struct pac_ast_literal char *string; }; -// pac_outline_e: An enumeration of all outlines known to Parcel. +// pac_ast_set_e: An enumeration of all sets known in Parcel's AST. // -// Outlines are tokens of which only the rough format is known, like +// Sets are descriptions which describe a rough format of token, like // with variable names; the format is known, but the actual name isn't. typedef enum { - PAC_OUTLINE_RUNE, - PAC_OUTLINE_WORD, - PAC_OUTLINE_INTEGER, - PAC_OUTLINE_FLOAT + PAC_AST_SET_RUNE, + PAC_AST_SET_WORD, + PAC_AST_SET_INTEGER, + PAC_AST_SET_FLOAT -} pac_outline_e; +} pac_ast_set_e; typedef enum { PAC_AST_ITEM_INVALID = 0x00, PAC_AST_ITEM_REFERENCE, PAC_AST_ITEM_LITERAL, - PAC_AST_ITEM_OUTLINE + PAC_AST_ITEM_SET } pac_ast_item_e; @@ -74,7 +74,7 @@ struct pac_ast_item union pac_item_data { pac_ast_literal_s literal; - pac_outline_e outline; + pac_ast_set_e set; pac_ast_reference_s reference; } data; }; diff --git a/code/src/ast.c b/code/src/ast.c index 5356c94..f5ac29c 100644 --- a/code/src/ast.c +++ b/code/src/ast.c @@ -67,15 +67,15 @@ i32_t pac_grow_item(pac_tlist_s *tlist, pac_ast_item_s *item) case PAC_TOKEN_KEYWORD_WORD: { - item->type = PAC_AST_ITEM_OUTLINE; - item->data.outline = PAC_OUTLINE_WORD; + item->type = PAC_AST_ITEM_SET; + item->data.set = PAC_AST_SET_WORD; SKIP_TOKEN; } return 1; case PAC_TOKEN_KEYWORD_INTEGER: { - item->type = PAC_AST_ITEM_OUTLINE; - item->data.outline = PAC_OUTLINE_INTEGER; + item->type = PAC_AST_ITEM_SET; + item->data.set = PAC_AST_SET_INTEGER; SKIP_TOKEN; } return 1; }