From 98a5d5c25230000ca5632eccd6670ee7ffe59393 Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Tue, 13 Sep 2022 20:45:21 -0400 Subject: [PATCH] Something --- parser/type-notation.go | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/parser/type-notation.go b/parser/type-notation.go index 764137e..35ef99d 100644 --- a/parser/type-notation.go +++ b/parser/type-notation.go @@ -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 +}