mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-06-10 18:04:18 -05:00
Parse reserved identifiers as dotted names of ambient modules (#55282)
This commit is contained in:
committed by
GitHub
parent
b5b6048bb3
commit
fe70ec984e
@@ -8226,7 +8226,7 @@ namespace Parser {
|
||||
// If we are parsing a dotted namespace name, we want to
|
||||
// propagate the 'Namespace' flag across the names if set.
|
||||
const namespaceFlag = flags & NodeFlags.Namespace;
|
||||
const name = parseIdentifier();
|
||||
const name = flags & NodeFlags.NestedNamespace ? parseIdentifierName() : parseIdentifier();
|
||||
const body = parseOptional(SyntaxKind.DotToken)
|
||||
? parseModuleOrNamespaceDeclaration(getNodePos(), /*hasJSDoc*/ false, /*modifiers*/ undefined, NodeFlags.NestedNamespace | namespaceFlag) as NamespaceDeclaration
|
||||
: parseModuleBlock();
|
||||
|
||||
Reference in New Issue
Block a user