Throw an error on malformed func arguments list
This commit is contained in:
parent
5371c0eeae
commit
8d46188f6c
@ -37,10 +37,17 @@ func (parser *ParsingOperation) parseFuncArguments (
|
|||||||
) {
|
) {
|
||||||
for {
|
for {
|
||||||
// if we've left the block, stop parsing
|
// if we've left the block, stop parsing
|
||||||
// TODO: throw error here, function arguments should only end
|
if !parser.token.Is(lexer.TokenKindIndent) ||
|
||||||
// on separator
|
parser.token.Value().(int) != 1 {
|
||||||
if !parser.token.Is(lexer.TokenKindIndent) { return }
|
|
||||||
if parser.token.Value().(int) != 1 { return }
|
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
|
// determine whether this is an input, output, or the method
|
||||||
// reciever
|
// reciever
|
||||||
|
Reference in New Issue
Block a user