Provide brands for statements.

Introduce a ModuleElement type to provide more clear typesafety.
This commit is contained in:
Cyrus Najmabadi
2014-11-30 14:06:15 -08:00
parent 5f00c7cdbc
commit 54bd524c90
5 changed files with 50 additions and 30 deletions

View File

@@ -3724,7 +3724,7 @@ module ts {
function aggregate(node: Node): void {
if (node.kind === SyntaxKind.BreakStatement || node.kind === SyntaxKind.ContinueStatement) {
statementAccumulator.push(node);
statementAccumulator.push(<BreakOrContinueStatement>node);
}
// Do not cross function boundaries.
else if (!isAnyFunction(node)) {