lang: ast: fix incorrect property parser state struct name

This commit is contained in:
2024-12-06 20:23:23 +00:00
parent 4e301a3e90
commit 41ef94bf3d

View File

@@ -62,7 +62,7 @@ static void finalise_property(struct property_parser_state *state)
static struct token_parse_result parse_ident(
struct ivy_parser *ctx, struct ivy_token *tok)
{
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_type);
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_state);
if (state->s_prev != IVY_SYM_DOLLAR) {
/* the only ident we're looking for is the property name, which
@@ -78,7 +78,7 @@ static struct token_parse_result parse_ident(
static struct token_parse_result parse_pipe(
struct ivy_parser *ctx, struct ivy_token *tok)
{
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_type);
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_state);
if (state->s_prev != IVY_TOK_IDENT) {
/* the only pipe we're looking for is the property
@@ -103,7 +103,7 @@ static struct token_parse_result parse_pipe(
static struct token_parse_result parse_left_paren(
struct ivy_parser *ctx, struct ivy_token *tok)
{
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_type);
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_state);
if (state->s_prev != IVY_TOK_IDENT) {
/* the only left paren we're looking for comes after the
@@ -127,7 +127,7 @@ static struct token_parse_result parse_left_paren(
static struct token_parse_result parse_right_paren(
struct ivy_parser *ctx, struct ivy_token *tok)
{
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_type);
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_state);
if (PROPERTY_TYPE(state->s_flags) != PROPERTY_AUTO) {
/* can only use parenthesis in auto-properties. */
@@ -151,7 +151,7 @@ static struct token_parse_result parse_right_paren(
static struct token_parse_result parse_equal_right_arrow(
struct ivy_parser *ctx, struct ivy_token *tok)
{
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_type);
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_state);
if (PROPERTY_TYPE(state->s_flags) != PROPERTY_FULL) {
/* this symbol cannot be used in auto-properties. */
@@ -175,7 +175,7 @@ static struct token_parse_result parse_equal_right_arrow(
static struct token_parse_result parse_comma(
struct ivy_parser *ctx, struct ivy_token *tok)
{
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_type);
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_state);
if (PROPERTY_TYPE(state->s_flags) == PROPERTY_FULL && state->s_prev != IVY_SYM_EQUAL_RIGHT_ANGLE) {
/* this symbol can only be used after get or set */
@@ -219,7 +219,7 @@ static struct token_parse_result parse_comma(
static struct token_parse_result parse_dot(
struct ivy_parser *ctx, struct ivy_token *tok)
{
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_type);
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_state);
if (PROPERTY_TYPE(state->s_flags) != PROPERTY_FULL) {
/* this symbol cannot be used in auto-properties. */
@@ -263,7 +263,7 @@ static struct token_parse_result parse_dot(
static struct token_parse_result parse_get(
struct ivy_parser *ctx, struct ivy_token *tok)
{
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_type);
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_state);
if (state->s_flags & PROPERTY_GET) {
/* property already has getter defined */
@@ -290,7 +290,7 @@ static struct token_parse_result parse_get(
static struct token_parse_result parse_set(
struct ivy_parser *ctx, struct ivy_token *tok)
{
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_type);
struct property_parser_state *state = parser_get_state(ctx, struct property_parser_state);
if (state->s_flags & PROPERTY_SET) {
/* property already has setter defined */