diff options
Diffstat (limited to 'src/tparse')
-rw-r--r-- | src/tparse/tree-statement.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/tparse/tree-statement.go b/src/tparse/tree-statement.go index b4f891b..c88b102 100644 --- a/src/tparse/tree-statement.go +++ b/src/tparse/tree-statement.go @@ -241,9 +241,10 @@ func keywordStatement(tokens *[]Token, tok, max int) (Node, int) { tok++ // Check for a numerical value and dip case "return": - if (*tokens)[tok].Type != DELIMIT || (*tokens)[tok].Data == "{" || (*tokens)[tok].Data == "(" { - tmp, tok = parseValueList(tokens, tok, max) + if (*tokens)[tok].Type == LINESEP || (*tokens)[tok].Data == ";/" { + return out, tok } + tmp, tok = parseValue(tokens, tok, max) case "alloc", "salloc", "realloc": // Parse value list tmp, tok = parseValueList(tokens, tok, max) |