Function output default values are skimmed over
This commit is contained in:
parent
d6db27ccb6
commit
d4d7c03830
@ -187,6 +187,13 @@ func (parser *ParsingOperation) parseFuncArguments (
|
||||
output.what, err = parser.parseType()
|
||||
if err != nil { return }
|
||||
|
||||
// skip the default value if we are skimming
|
||||
if parser.skimming {
|
||||
err = parser.skipIndentLevel(2)
|
||||
into.outputs = append(into.outputs, output)
|
||||
return
|
||||
}
|
||||
|
||||
// parse default value
|
||||
if parser.token.Is(lexer.TokenKindNewline) {
|
||||
err = parser.nextToken()
|
||||
|
@ -21,6 +21,7 @@ func ro fComplexFunction
|
||||
external
|
||||
func ro gExternalFunction
|
||||
> x:Int
|
||||
< arr:Int
|
||||
---
|
||||
external
|
||||
`, test)
|
||||
|
@ -34,5 +34,9 @@ func ro fComplexFunction
|
||||
|
||||
func ro gExternalFunction
|
||||
> x:Int
|
||||
< arr:Int 5
|
||||
34908
|
||||
39 3498
|
||||
38 219
|
||||
---
|
||||
external
|
||||
|
Reference in New Issue
Block a user