Renamed outlines to sets in the AST

This commit is contained in:
Eric-Paul Ickhorn 2023-11-28 16:21:50 +01:00
parent 0c220757df
commit a002556420
2 changed files with 13 additions and 13 deletions

View File

@ -46,25 +46,25 @@ struct pac_ast_literal
char *string; 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. // with variable names; the format is known, but the actual name isn't.
typedef enum typedef enum
{ {
PAC_OUTLINE_RUNE, PAC_AST_SET_RUNE,
PAC_OUTLINE_WORD, PAC_AST_SET_WORD,
PAC_OUTLINE_INTEGER, PAC_AST_SET_INTEGER,
PAC_OUTLINE_FLOAT PAC_AST_SET_FLOAT
} pac_outline_e; } pac_ast_set_e;
typedef enum typedef enum
{ {
PAC_AST_ITEM_INVALID = 0x00, PAC_AST_ITEM_INVALID = 0x00,
PAC_AST_ITEM_REFERENCE, PAC_AST_ITEM_REFERENCE,
PAC_AST_ITEM_LITERAL, PAC_AST_ITEM_LITERAL,
PAC_AST_ITEM_OUTLINE PAC_AST_ITEM_SET
} pac_ast_item_e; } pac_ast_item_e;
@ -74,7 +74,7 @@ struct pac_ast_item
union pac_item_data union pac_item_data
{ {
pac_ast_literal_s literal; pac_ast_literal_s literal;
pac_outline_e outline; pac_ast_set_e set;
pac_ast_reference_s reference; pac_ast_reference_s reference;
} data; } data;
}; };

View File

@ -67,15 +67,15 @@ i32_t pac_grow_item(pac_tlist_s *tlist, pac_ast_item_s *item)
case PAC_TOKEN_KEYWORD_WORD: case PAC_TOKEN_KEYWORD_WORD:
{ {
item->type = PAC_AST_ITEM_OUTLINE; item->type = PAC_AST_ITEM_SET;
item->data.outline = PAC_OUTLINE_WORD; item->data.set = PAC_AST_SET_WORD;
SKIP_TOKEN; SKIP_TOKEN;
} return 1; } return 1;
case PAC_TOKEN_KEYWORD_INTEGER: case PAC_TOKEN_KEYWORD_INTEGER:
{ {
item->type = PAC_AST_ITEM_OUTLINE; item->type = PAC_AST_ITEM_SET;
item->data.outline = PAC_OUTLINE_INTEGER; item->data.set = PAC_AST_SET_INTEGER;
SKIP_TOKEN; SKIP_TOKEN;
} return 1; } return 1;
} }