Skip to content

Commit 2efdaef

Browse files
martin-juhlinDenys Smirnov
authored andcommitted
named constructor
1 parent 1da7d58 commit 2efdaef

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

parser/parser_rules.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,10 @@ func (p *sourceParser) consumeAnnotationPart() *ast.Annotation {
443443
n.Values = list
444444
} else {
445445
n.Value = p.consumeIdentifier()
446+
if p.isToken(tokenTypeLeftParen) {
447+
// Consume (optional) parameters, e.g. NamedConstructor=Foo(...).
448+
n.Parameters = p.consumeParameters()
449+
}
446450
}
447451
} else if p.isToken(tokenTypeLeftParen) {
448452
// Consume (optional) parameters.

0 commit comments

Comments
 (0)