fix: don`t overlap "close"
This commit is contained in:
@@ -72,11 +72,11 @@ func ParseExpression(i *iterator.Iterator[tokenizer.Token]) (lambda.Expression,
|
||||
args = append(args, arg)
|
||||
}
|
||||
|
||||
close, closeErr := i.Next()
|
||||
if closeErr != nil {
|
||||
return nil, fmt.Errorf("could not parse call terminating parenthesis: %w", closeErr)
|
||||
} else if close.Type != tokenizer.TokenCloseParen {
|
||||
return nil, fmt.Errorf("expected call terminating parenthesis, got '%v' (column %v)", close.Value, close.Index)
|
||||
closing, closingErr := i.Next()
|
||||
if closingErr != nil {
|
||||
return nil, fmt.Errorf("could not parse call terminating parenthesis: %w", closingErr)
|
||||
} else if closing.Type != tokenizer.TokenCloseParen {
|
||||
return nil, fmt.Errorf("expected call terminating parenthesis, got '%v' (column %v)", closing.Value, closing.Index)
|
||||
}
|
||||
|
||||
// Construction.
|
||||
|
||||
Reference in New Issue
Block a user