diff options
author | Bad Diode <bd@badd10de.dev> | 2024-06-25 10:36:02 +0200 |
---|---|---|
committer | Bad Diode <bd@badd10de.dev> | 2024-06-25 10:36:02 +0200 |
commit | bcc40682a0d699e8c36df62975c12cdea491d167 (patch) | |
tree | 6511cdef1730d39bb81fceaf9839658654280f32 /src/parser.c | |
parent | 9eb5c9bfa3fcf8d7b03efd7d4def71e39ae3f799 (diff) | |
download | bdl-bcc40682a0d699e8c36df62975c12cdea491d167.tar.gz bdl-bcc40682a0d699e8c36df62975c12cdea491d167.zip |
Add struct literals typechecking
Diffstat (limited to 'src/parser.c')
-rw-r--r-- | src/parser.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/parser.c b/src/parser.c index 7b49b55..b08c82a 100644 --- a/src/parser.c +++ b/src/parser.c | |||
@@ -959,7 +959,7 @@ parse_symbol(Parser *parser) { | |||
959 | field->field_name = array_pop(parser->nodes); | 959 | field->field_name = array_pop(parser->nodes); |
960 | parse_consume(parser, TOK_ASSIGN, cstr("expected assignment")); | 960 | parse_consume(parser, TOK_ASSIGN, cstr("expected assignment")); |
961 | parse_expr(parser, PREC_LOW); | 961 | parse_expr(parser, PREC_LOW); |
962 | field->field_type = array_pop(parser->nodes); | 962 | field->field_val = array_pop(parser->nodes); |
963 | array_push(node->elements, field, parser->storage); | 963 | array_push(node->elements, field, parser->storage); |
964 | } | 964 | } |
965 | } else if (parse_match(parser, TOK_LSQUARE)) { | 965 | } else if (parse_match(parser, TOK_LSQUARE)) { |