diff --git a/src/brackets.go b/src/brackets.go index 3a59e09..ff03f63 100644 --- a/src/brackets.go +++ b/src/brackets.go @@ -6,18 +6,11 @@ import ( var bracketsCompile = makeRegex(`( *)\((.|\n)+\)( *)`) -type brackets struct { - VAL any - line int - code string - path string -} - func isBrackets(code UNPARSEcode) bool { return bracketsCompile.MatchString(code.code) } -func parseBrackets(code UNPARSEcode, index int, codeline []UNPARSEcode) (brackets, bool, ArErr, int) { +func parseBrackets(code UNPARSEcode, index int, codeline []UNPARSEcode) (any, bool, ArErr, int) { trimmed := strings.TrimSpace(code.code) resp, worked, err, i := translateVal(UNPARSEcode{ code: trimmed[1 : len(trimmed)-1], @@ -25,10 +18,5 @@ func parseBrackets(code UNPARSEcode, index int, codeline []UNPARSEcode) (bracket line: code.line, path: code.path, }, index, codeline, 0) - return brackets{ - VAL: resp, - line: code.line, - code: code.realcode, - path: code.path, - }, worked, err, i + return resp, worked, err, i } diff --git a/src/run.go b/src/run.go index 24a8e7d..e69bcb2 100644 --- a/src/run.go +++ b/src/run.go @@ -80,14 +80,6 @@ func runVal(line any, stack stack, stacklevel int) (any, ArErr) { message: "cannot negate a non-number", EXISTS: true, } - case brackets: - if stackoverflow { - linenum = x.line - path = x.path - code = x.code - break - } - return runVal(x.VAL, stack, stacklevel+1) case operationType: if stackoverflow { linenum = x.line