@@ -350,7 +350,7 @@ export class Parser extends DiagnosticEmitter {
350350 const members : VariableDeclaration [ ] = new Array ( ) ;
351351 const isDeclare = hasModifier ( ModifierKind . DECLARE , modifiers ) ;
352352 do {
353- const member : VariableDeclaration | null = this . parseVariableDeclaration ( tn , isDeclare ) ;
353+ const member : VariableDeclaration | null = this . parseVariableDeclaration ( tn , isDeclare , modifiers ) ;
354354 if ( ! member )
355355 return null ;
356356 members . push ( < VariableDeclaration > member ) ;
@@ -361,7 +361,7 @@ export class Parser extends DiagnosticEmitter {
361361 return ret ;
362362 }
363363
364- parseVariableDeclaration ( tn : Tokenizer , isDeclare : bool = false ) : VariableDeclaration | null {
364+ parseVariableDeclaration ( tn : Tokenizer , isDeclare : bool = false , parentModifiers : Modifier [ ] ) : VariableDeclaration | null {
365365 // Identifier (':' Type)? ('=' Expression)?
366366 if ( ! tn . skip ( Token . IDENTIFIER ) ) {
367367 this . error ( DiagnosticCode . Identifier_expected , tn . range ( ) ) ;
@@ -383,7 +383,7 @@ export class Parser extends DiagnosticEmitter {
383383 if ( ! initializer )
384384 return null ;
385385 }
386- return Statement . createVariableDeclaration ( identifier , type , initializer , Range . join ( identifier . range , tn . range ( ) ) ) ;
386+ return Statement . createVariableDeclaration ( identifier , type , initializer , parentModifiers , Range . join ( identifier . range , tn . range ( ) ) ) ;
387387 }
388388
389389 parseEnum ( tn : Tokenizer , modifiers : Modifier [ ] ) : EnumDeclaration | null {
0 commit comments