From 10861b16487e785a1a05b92ab28429d0b11ca007 Mon Sep 17 00:00:00 2001 From: Daniel Rosenwasser Date: Thu, 4 Jun 2015 16:29:12 -0700 Subject: [PATCH] Amended comment. --- src/compiler/parser.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 87a13c6fbce..467be939c91 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -3995,12 +3995,13 @@ module ts { } break; - // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers when - // ASI takes effect. In such cases, we cannot parse out the "expected" declarations. For instance, while + // 'declare', 'module', 'namespace', 'interface'* and 'type' are all legal JavaScript identifiers; + // however, an identifier cannot be followed by another identifier on the same line. This is what we + // count on to parse out the respective declarations. For instance, we exploit this to say that // // namespace n // - // can be none other than the beginning of a namespace declaration, JavaScript sees + // can be none other than the beginning of a namespace declaration, but need to respect that JavaScript sees // // namespace // n