(parameter *ast.JSDocParameterOrPropertyTag)
| 609 | } |
| 610 | |
| 611 | func (p *Parser) makeQuestionIfOptional(parameter *ast.JSDocParameterOrPropertyTag) *ast.Node { |
| 612 | var questionToken *ast.Node |
| 613 | if parameter.IsBracketed || parameter.TypeExpression != nil && parameter.TypeExpression.Type().Kind == ast.KindJSDocOptionalType { |
| 614 | questionToken = p.factory.NewToken(ast.KindQuestionToken) |
| 615 | questionToken.Loc = parameter.Loc |
| 616 | questionToken.Flags = p.contextFlags | ast.NodeFlagsReparsed |
| 617 | } |
| 618 | return questionToken |
| 619 | } |
| 620 | |
| 621 | func findMatchingParameter(fun *ast.Node, parameterTag *ast.JSDocParameterOrPropertyTag, jsDoc *ast.Node) (*ast.ParameterDeclaration, bool) { |
| 622 | tagIndex := -1 |
no test coverage detected