Something

This commit is contained in:
Sasha Koshka 2022-09-13 20:45:21 -04:00
parent 1457067c55
commit 98a5d5c252

View File

@ -90,6 +90,8 @@ func (parser *ParsingOperation) parseBasicDefaultValue () (
) {
err = parser.expect(lexer.TokenKindLessThan)
if err != nil { return }
err = parser.nextToken()
if err != nil { return }
var arguments []Argument
@ -119,3 +121,25 @@ func (parser *ParsingOperation) parseBasicDefaultValue () (
}
return
}
// parseObjectDefaultValue parses default values and new members of an object
// type.
func (parser *ParsingOperation) parseObjectDefaultValue () (
value Argument,
members []TypeMember,
err error,
) {
err = parser.expect(lexer.TokenKindLParen)
if err != nil { return }
parser.nextToken()
if err != nil { return }
for {
err = parser.expect(lexer.TokenKindDot)
if err != nil { return }
parser.nextToken()
if err != nil { return }
}
return
}