@@ -51,6 +51,8 @@ ExportDeclarationList.prototype.declarationForNode = function(node) {
5151 return new VariableExportDeclaration ( this . module , node ) ;
5252 } else if ( n . FunctionDeclaration . check ( node . declaration ) ) {
5353 return new FunctionExportDeclaration ( this . module , node ) ;
54+ } else if ( n . ClassDeclaration . check ( node . declaration ) ) {
55+ return new ClassExportDeclaration ( this . module , node ) ;
5456 } else if ( n . ExportBatchSpecifier . check ( node . specifiers [ 0 ] ) ) {
5557 throw new Error (
5658 '`export *` found at ' + sourcePosition ( this . module , node ) +
@@ -200,6 +202,31 @@ memo(VariableExportDeclaration.prototype, 'specifiers', /** @this VariableExport
200202 } ) ;
201203} ) ;
202204
205+ /**
206+ * Represents an export declaration of the form:
207+ *
208+ * export class Foo {}
209+ *
210+ * @constructor
211+ * @extends ExportDeclaration
212+ * @param {Module } mod
213+ * @param {AST.ExportDeclaration } node
214+ */
215+ function ClassExportDeclaration ( mod , node ) {
216+ ExportDeclaration . call ( this , mod , node ) ;
217+ }
218+ extend ( ClassExportDeclaration , ExportDeclaration ) ;
219+
220+ /**
221+ * Gets the list of export specifiers for this declaration.
222+ *
223+ * @type {ExportSpecifier[] }
224+ * @name ClassExportDeclaration#specifiers
225+ */
226+ memo ( ClassExportDeclaration . prototype , 'specifiers' , /** @this ClassExportDeclaration */ function ( ) {
227+ return [ new ExportSpecifier ( this , this . node . declaration ) ] ;
228+ } ) ;
229+
203230/**
204231 * Represents an export declaration of the form:
205232 *
0 commit comments