@@ -3804,7 +3804,7 @@ module ts {
3804
3804
return isIdentifierOrKeyword ( ) && ! scanner . hasPrecedingLineBreak ( ) ;
3805
3805
}
3806
3806
3807
- function parseDeclarationFlags ( ) : boolean {
3807
+ function isDeclaration ( ) : boolean {
3808
3808
while ( true ) {
3809
3809
switch ( token ) {
3810
3810
case SyntaxKind . VarKeyword :
@@ -3873,8 +3873,8 @@ module ts {
3873
3873
}
3874
3874
}
3875
3875
3876
- function getDeclarationFlags ( ) : boolean {
3877
- return lookAhead ( parseDeclarationFlags ) ;
3876
+ function isStartOfDeclaration ( ) : boolean {
3877
+ return lookAhead ( isDeclaration ) ;
3878
3878
}
3879
3879
3880
3880
function isStartOfStatement ( ) : boolean {
@@ -3908,7 +3908,7 @@ module ts {
3908
3908
case SyntaxKind . ConstKeyword :
3909
3909
case SyntaxKind . ExportKeyword :
3910
3910
case SyntaxKind . ImportKeyword :
3911
- return getDeclarationFlags ( ) ;
3911
+ return isStartOfDeclaration ( ) ;
3912
3912
3913
3913
case SyntaxKind . DeclareKeyword :
3914
3914
case SyntaxKind . InterfaceKeyword :
@@ -3924,7 +3924,7 @@ module ts {
3924
3924
case SyntaxKind . StaticKeyword :
3925
3925
// When these don't start a declaration, they may be the start of a class member if an identifier
3926
3926
// immediately follows. Otherwise they're an identifier in an expression statement.
3927
- return getDeclarationFlags ( ) || ! lookAhead ( nextTokenIsIdentifierOrKeywordOnSameLine ) ;
3927
+ return isStartOfDeclaration ( ) || ! lookAhead ( nextTokenIsIdentifierOrKeywordOnSameLine ) ;
3928
3928
3929
3929
default :
3930
3930
return isStartOfExpression ( ) ;
@@ -4003,7 +4003,7 @@ module ts {
4003
4003
case SyntaxKind . ProtectedKeyword :
4004
4004
case SyntaxKind . PublicKeyword :
4005
4005
case SyntaxKind . StaticKeyword :
4006
- if ( getDeclarationFlags ( ) ) {
4006
+ if ( isStartOfDeclaration ( ) ) {
4007
4007
return parseDeclaration ( ) ;
4008
4008
}
4009
4009
break ;
0 commit comments