@@ -89,11 +89,11 @@ module.exports.prototype = {
8989 }
9090
9191 var parent = node . parentNode ;
92- var shortland = false ;
92+ var shorthand = false ;
9393
9494 // shorthand or constructor methods
9595 if ( parent . method || parent . type === 'MethodDefinition' ) {
96- shortland = true ;
96+ shorthand = true ;
9797 node = parent . key ;
9898 }
9999
@@ -103,7 +103,7 @@ module.exports.prototype = {
103103 currentToken = file . getNextToken ( currentToken ) ;
104104 }
105105
106- if ( beforeStar && ! shortland ) {
106+ if ( beforeStar && ! shorthand ) {
107107 // currentToken assigned outside of function
108108 errors . assert . noWhitespaceBetween ( {
109109 token : currentToken ,
@@ -113,22 +113,18 @@ module.exports.prototype = {
113113 }
114114
115115 if ( afterStar ) {
116- if ( shortland ) {
117- errors . assert . noWhitespaceBetween ( {
118- token : file . getPrevToken ( currentToken ) ,
119- nextToken : currentToken ,
120- message : 'Illegal space after star'
121- } ) ;
116+ if ( shorthand ) {
117+ currentToken = file . getPrevToken ( currentToken ) ;
122118 } else {
123-
124119 // currentToken reassigned for star token
125120 currentToken = file . getNextToken ( currentToken ) ;
126- errors . assert . noWhitespaceBetween ( {
127- token : currentToken ,
128- nextToken : file . getNextToken ( currentToken ) ,
129- message : 'Illegal space after star'
130- } ) ;
131121 }
122+
123+ errors . assert . noWhitespaceBetween ( {
124+ token : currentToken ,
125+ nextToken : file . getNextToken ( currentToken ) ,
126+ message : 'Illegal space after star'
127+ } ) ;
132128 }
133129 } ) ;
134130 }
0 commit comments