Renamed outlines to sets in the AST
This commit is contained in:
parent
0c220757df
commit
a002556420
|
@ -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;
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue