diff options
author | Kyle Gunger <kgunger12@gmail.com> | 2021-10-29 21:27:04 -0400 |
---|---|---|
committer | Kyle Gunger <kgunger12@gmail.com> | 2021-10-29 21:27:04 -0400 |
commit | 623bda06bf50b495beffe249f316967ea5a60b48 (patch) | |
tree | 9c38c0bfbce73c4afe6788fbbeb6bdc04e5b727d /src/tparse/tree-statement.go | |
parent | 2997d5a26365437a0f3b02daceabd60d73ead257 (diff) |
[AST] isTypeThenValue
It might work (?)
Diffstat (limited to 'src/tparse/tree-statement.go')
-rw-r--r-- | src/tparse/tree-statement.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tparse/tree-statement.go b/src/tparse/tree-statement.go index 1c648d2..ed10b42 100644 --- a/src/tparse/tree-statement.go +++ b/src/tparse/tree-statement.go @@ -16,6 +16,7 @@ package tparse +// TODO: re-validate this code. I forgot if it works or not. func parseBlock(tokens *[]Token, tok, max int) (Node, int) { out, tmp, def, name := Node{}, Node{}, Node{}, false out.Data = Token{Type: 10, Data: "block"} @@ -97,6 +98,7 @@ func parseBlock(tokens *[]Token, tok, max int) (Node, int) { return out, tok } +// This should work once isTypeThenValue properly functions func parseStatement(tokens *[]Token, tok, max int) (Node, int) { out := Node{} out.Data = Token{Type: 11, Data: ";"} @@ -189,6 +191,7 @@ func keywordStatement(tokens *[]Token, tok, max int) (Node, int) { return out, tok } +// Should work, but none of this is tested. func parseDef(tokens *[]Token, tok, max int) (Node, int) { out := Node{} out.Data = Token{} |