(nested bool)
| 990 | } |
| 991 | |
| 992 | func (p *Parser) parseJSDocTypeNameWithNamespace(nested bool) *ast.Node { |
| 993 | start := p.scanner.TokenStart() |
| 994 | if !tokenIsIdentifierOrKeyword(p.token) { |
| 995 | return nil |
| 996 | } |
| 997 | typeNameOrNamespaceName := p.parseJSDocIdentifierName(nil) |
| 998 | if p.parseOptionalJsdoc(ast.KindDotToken) { |
| 999 | body := p.parseJSDocTypeNameWithNamespace(true /*nested*/) |
| 1000 | jsDocNamespaceNode := p.factory.NewModuleDeclaration( |
| 1001 | nil, /*modifiers*/ |
| 1002 | ast.KindNamespaceKeyword, /*keyword*/ |
| 1003 | typeNameOrNamespaceName, |
| 1004 | body, |
| 1005 | ) |
| 1006 | if nested { |
| 1007 | jsDocNamespaceNode.Flags |= ast.NodeFlagsNestedNamespace |
| 1008 | } |
| 1009 | return p.finishNode(jsDocNamespaceNode, start) |
| 1010 | } |
| 1011 | if nested { |
| 1012 | typeNameOrNamespaceName.Flags |= ast.NodeFlagsIdentifierIsInJSDocNamespace |
| 1013 | } |
| 1014 | return typeNameOrNamespaceName |
| 1015 | } |
| 1016 | |
| 1017 | func (p *Parser) parseTypedefTag(start int, tagName *ast.IdentifierNode, indent int, indentText string) *ast.Node { |
| 1018 | typeExpression := p.tryParseTypeExpression() |
no test coverage detected