diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tparse/tree-statement.go | 2 | ||||
-rw-r--r-- | src/tparse/tree-value.go | 9 |
2 files changed, 10 insertions, 1 deletions
diff --git a/src/tparse/tree-statement.go b/src/tparse/tree-statement.go index 262bd6f..2fb6b8a 100644 --- a/src/tparse/tree-statement.go +++ b/src/tparse/tree-statement.go @@ -186,7 +186,7 @@ func keywordStatement(tokens *[]Token, tok, max int) (Node, int) { // Check for a numerical value and dip case "return": if (*tokens)[tok].Type != DELIMIT || (*tokens)[tok].Data == "{" || (*tokens)[tok].Data == "(" { - tmp, tok = parseValue(tokens, tok, max) + tmp, tok = parseValueList(tokens, tok, max) } case "alloc", "salloc": // Parse value list diff --git a/src/tparse/tree-value.go b/src/tparse/tree-value.go index edca103..554edcd 100644 --- a/src/tparse/tree-value.go +++ b/src/tparse/tree-value.go @@ -362,7 +362,16 @@ func parseType(tokens *[]Token, tok, max int, param bool) (Node, int) { case DEFWORD: if (*tokens)[tok+1].Data == "(" { tmp, tok = parseTypeParams(tokens, tok, max) + } else if (*tokens)[tok+1].Data == "." { + tmp.Data = t + out.Sub = append(out.Sub, tmp) + tok++ + continue + } else { + tmp.Data = t + tok++ } + out.Sub = append(out.Sub, tmp) return out, tok |