Blocks under control flow phrases now parse

... except for switch cases. This will be added momentarily.
This commit is contained in:
2022-09-03 15:22:18 -04:00
parent 837b1c76a4
commit bcd44828dc
4 changed files with 62 additions and 44 deletions

View File

@@ -4,15 +4,6 @@ import "git.tebibyte.media/arf/arf/types"
import "git.tebibyte.media/arf/arf/lexer"
import "git.tebibyte.media/arf/arf/infoerr"
// controlFlowNames contains a list of all command names that must have a block
// underneath them.
var controlFlowNames = []string {
"if", "else", "elseif",
"for", "while",
"switch",
"defer",
}
// parseFunc parses a function section.
func (parser *ParsingOperation) parseFuncSection () (
section *FuncSection,