From 6d25f97d1035a775d6eb9f135f8e8231521087af Mon Sep 17 00:00:00 2001 From: Kyle Gunger Date: Thu, 7 Apr 2022 13:05:08 -0400 Subject: [EXEC] Some fixes + Fix recursion error when converting arrays + Add conversion from bool to num + Fix conversion from num to bool + Flush out evalParams ~ Change type parsing for block returns --- src/tparse/tree-statement.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/tparse') diff --git a/src/tparse/tree-statement.go b/src/tparse/tree-statement.go index 25ddab6..b4f891b 100644 --- a/src/tparse/tree-statement.go +++ b/src/tparse/tree-statement.go @@ -40,7 +40,7 @@ func parseBlock(tokens *[]Token, tok, max int) (Node, int) { if sparse { tmp, tok = parseStatementList(tokens, tok + 1, max) } else { - tmp, tok = parseTypeList(tokens, tok + 1, max) + tmp, tok = parseType(tokens, tok + 1, max, false) } tmp.Data.Data = "[]" def.Sub = append(def.Sub, tmp) @@ -215,7 +215,7 @@ func keywordStatement(tokens *[]Token, tok, max int) (Node, int) { out.Sub = append(out.Sub, tmp) tok++ if (*tokens)[tok].Data == "[" { - tmp, tok = parseTypeList(tokens, tok + 1, max) + tmp, tok = parseType(tokens, tok + 1, max, false) out.Sub = append(out.Sub, tmp) tok++ } -- cgit v1.2.3