func-section #1

Merged
sashakoshka merged 52 commits from func-section into main 2022-09-03 18:09:14 -06:00
Showing only changes of commit 8d46188f6c - Show all commits

View File

@ -37,10 +37,17 @@ func (parser *ParsingOperation) parseFuncArguments (
) {
for {
// if we've left the block, stop parsing
// TODO: throw error here, function arguments should only end
// on separator
if !parser.token.Is(lexer.TokenKindIndent) { return }
if parser.token.Value().(int) != 1 { return }
if !parser.token.Is(lexer.TokenKindIndent) ||
parser.token.Value().(int) != 1 {
if into.receiver != nil {
err = parser.token.NewError (
"func section terminated without a " +
"separator token",
infoerr.ErrorKindError)
}
return
}
// determine whether this is an input, output, or the method
// reciever