lang: change symbols for properties and atoms to -> and $ respectively

This commit is contained in:
2025-04-10 13:04:12 +01:00
parent 8045872dc3
commit 2235f9c0a9
4 changed files with 9 additions and 5 deletions

View File

@@ -15,7 +15,7 @@ struct class_parser_state {
int s_prev_token;
};
static struct token_parse_result parse_dollar(
static struct token_parse_result parse_hyphen_right_angle(
struct ivy_parser *ctx, struct ivy_token *tok)
{
struct class_parser_state *state
@@ -146,8 +146,9 @@ static void to_string(struct ivy_ast_node *node, b_string *str)
{
struct ivy_ast_class_node *c = (struct ivy_ast_class_node *)node;
b_string_append_cstrf(str, "%s (%s)", ivy_ast_node_type_to_string(node->n_type),
c->n_ident->t_str);
b_string_append_cstrf(
str, "%s (%s)", ivy_ast_node_type_to_string(node->n_type),
c->n_ident->t_str);
}
static void init_state(struct ivy_parser *ctx, struct parser_state *sp, uintptr_t arg)
@@ -183,7 +184,7 @@ struct ast_node_type class_node_ops = {
.n_state_size = sizeof(struct class_parser_state),
.n_node_size = sizeof(struct ivy_ast_class_node),
.n_symbol_parsers = {
SYM_PARSER(DOLLAR, parse_dollar),
SYM_PARSER(HYPHEN_RIGHT_ANGLE, parse_hyphen_right_angle),
SYM_PARSER(HYPHEN, parse_hyphen),
SYM_PARSER(PLUS, parse_plus),
},