aboutsummaryrefslogtreecommitdiff
path: root/parse.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-09-02 18:47:39 -0400
committerBruce Hill <bruce@bruce-hill.com>2024-09-02 18:47:39 -0400
commit61e482f6f36aee6f72392a6188f2ec5c858b88fd (patch)
treebea4123fcc62dd834405ae89ce9fe260e90a0023 /parse.c
parentf0f8f218703ebb4512b3cd3f9e06b86a7d9861b0 (diff)
Initial WIP first past
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parse.c b/parse.c
index af011877..8ab3688e 100644
--- a/parse.c
+++ b/parse.c
@@ -15,6 +15,7 @@
#include "ast.h"
#include "builtins/integers.h"
+#include "builtins/text.h"
#include "builtins/table.h"
#include "builtins/util.h"
@@ -1894,7 +1895,7 @@ ast_t *parse_enum_def(parse_ctx_t *ctx, const char *pos) {
spaces(&pos);
if (match(&pos, "=")) {
ast_t *val = expect(ctx, tag_start, &pos, parse_int, "I expected an integer literal after this '='");
- Int_t i = Int$from_text(Match(val, Int)->str, NULL);
+ Int_t i = Int$from_text(Text$from_str(Match(val, Int)->str), NULL);
// TODO check for overflow
next_value = (i.small >> 2);
}