parseFuncSection calls parseFuncArguments now
This commit is contained in:
parent
09706ef7f3
commit
bcb1b9b6d2
@ -14,16 +14,23 @@ func (parser *ParsingOperation) parseFuncSection () (
|
|||||||
|
|
||||||
section = &FuncSection { location: parser.token.Location() }
|
section = &FuncSection { location: parser.token.Location() }
|
||||||
|
|
||||||
|
// get permission
|
||||||
err = parser.nextToken(lexer.TokenKindPermission)
|
err = parser.nextToken(lexer.TokenKindPermission)
|
||||||
if err != nil { return }
|
if err != nil { return }
|
||||||
section.permission = parser.token.Value().(types.Permission)
|
section.permission = parser.token.Value().(types.Permission)
|
||||||
|
|
||||||
|
// get name
|
||||||
err = parser.nextToken(lexer.TokenKindName)
|
err = parser.nextToken(lexer.TokenKindName)
|
||||||
if err != nil { return }
|
if err != nil { return }
|
||||||
section.name = parser.token.Value().(string)
|
section.name = parser.token.Value().(string)
|
||||||
|
|
||||||
|
// get arguments
|
||||||
err = parser.nextToken(lexer.TokenKindNewline)
|
err = parser.nextToken(lexer.TokenKindNewline)
|
||||||
if err != nil { return }
|
if err != nil { return }
|
||||||
|
err = parser.nextToken()
|
||||||
|
if err != nil { return }
|
||||||
|
err = parser.parseFuncArguments(section)
|
||||||
|
if err != nil { return }
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user