From 16d26fc9a879f9d5044119d991433d798ed8f3ec Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Tue, 8 Oct 2024 16:57:55 -0400 Subject: [tnslc] enum hotfix --- tnslc/parse/ast.tnsl | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'tnslc') diff --git a/tnslc/parse/ast.tnsl b/tnslc/parse/ast.tnsl index 842a7fc..420f3d3 100644 --- a/tnslc/parse/ast.tnsl +++ b/tnslc/parse/ast.tnsl @@ -1943,31 +1943,18 @@ int errors_shown = 0 # Check for enum type /; if (first`.data` == '[') _ast_list_type(fin, ~sct, first) - - Token tmp = produce_next_token(fin, first`) - first`.end() - first` = tmp ;/ # Check for def list /; if (first`._type !== TTYPE_DELIM || first`.data` !== '{') - _ast_print_err(fin, first, "Expected new identifier for typedef after 'struct'\0") + _ast_print_err(fin, first, "Expected '{' after enum definition\0") mod`.add_child(~sct) - - Token tmp = produce_next_token(fin, first`) - first`.end() - first` = tmp - return ;/ # Parse deflist and push root node into module _ast_list_enum(fin, ~sct, first) mod`.add_child(~sct) - - Token tmp = produce_next_token(fin, first`) - first`.end() - first` = tmp ;/ /; _ast_decl (~utils.File fin, ~Node mod, ~Token first) -- cgit v1.2.3