diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2021-10-31 00:06:27 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2021-10-31 00:06:27 -0400 |
commit | a3e0d8d47b47a5b3ec4cb0f40a7411091af900a6 (patch) | |
tree | 07decd29f0e7a0bcad98b6aad2e52a70db0f0a25 /src | |
parent | 61bd3b82b9d493bfb35fe5fef625c17ebf0c1fcb (diff) |
[AST] another bugfix for void types
Diffstat (limited to 'src')
-rw-r--r-- | src/tparse/tree-value.go | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/tparse/tree-value.go b/src/tparse/tree-value.go index 843ef0c..abb785b 100644 --- a/src/tparse/tree-value.go +++ b/src/tparse/tree-value.go @@ -273,8 +273,13 @@ func parseValue(tokens *[]Token, tok, max int) (Node, int) { parn-- case "/;": + _, prs := ORDER[(*tokens)[tok - 1].Data] + if !prs && block == 0 { + goto PARSEBIN + } block++ case ";/": + if block > 0 { block-- } @@ -329,8 +334,8 @@ func parseTypeParams(tokens *[]Token, tok, max int) (Node, int) { tmp.Data.Data = "[]" } else if t.Data == ")" || t.Data == "]" || t.Data == "}" { // End of type - tok++ - goto VOIDDONE + //errOutV("Test", tok, max, t) + goto DONE } else { errOut("Error: unexpected delimeter when parsing type", t) } @@ -340,13 +345,13 @@ func parseTypeParams(tokens *[]Token, tok, max int) (Node, int) { default: // End of type - goto VOIDDONE + goto DONE } out.Sub = append(out.Sub, tmp) } - VOIDDONE: + DONE: return out, tok } |