mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-27 04:46:25 -05:00
Move grammar checking: exportAssignment; there are still errors from incomplete grammar migration
This commit is contained in:
@@ -8861,6 +8861,11 @@ module ts {
|
||||
}
|
||||
|
||||
function checkExportAssignment(node: ExportAssignment) {
|
||||
// Grammar checking
|
||||
if (node.flags & NodeFlags.Modifier) {
|
||||
grammarErrorOnFirstToken(node, Diagnostics.An_export_assignment_cannot_have_modifiers);
|
||||
}
|
||||
|
||||
var container = node.parent;
|
||||
if (container.kind !== SyntaxKind.SourceFile) {
|
||||
// In a module, the immediate parent will be a block, so climb up one more parent
|
||||
|
||||
@@ -4642,7 +4642,7 @@ module ts {
|
||||
case SyntaxKind.Constructor: return checkConstructor(<ConstructorDeclaration>node);
|
||||
//case SyntaxKind.DeleteExpression: return checkDeleteExpression(<DeleteExpression> node);
|
||||
//case SyntaxKind.ElementAccessExpression: return checkElementAccessExpression(<ElementAccessExpression>node);
|
||||
case SyntaxKind.ExportAssignment: return checkExportAssignment(<ExportAssignment>node);
|
||||
//case SyntaxKind.ExportAssignment: return checkExportAssignment(<ExportAssignment>node);
|
||||
case SyntaxKind.ExternalModuleReference: return checkExternalModuleReference(<ExternalModuleReference>node);
|
||||
case SyntaxKind.ForInStatement: return checkForInStatement(<ForInStatement>node);
|
||||
case SyntaxKind.ForStatement: return checkForStatement(<ForStatement>node);
|
||||
|
||||
Reference in New Issue
Block a user