File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -975,9 +975,8 @@ namespace ts {
975
975
result = text . substring ( start , end ) ; // No need to use all the fragments; no _ removal needed
976
976
}
977
977
978
- checkForIdentifierAfterNumericLiteral ( ) ;
979
978
if ( decimalFragment !== undefined || tokenFlags & TokenFlags . Scientific ) {
980
- checkForIdentifierAfterNumericLiteral ( ) ;
979
+ checkForIdentifierStartAfterNumericLiteral ( ) ;
981
980
return {
982
981
type : SyntaxKind . NumericLiteral ,
983
982
value : "" + + result // if value is not an integer, it can be safely coerced to a number
@@ -986,12 +985,12 @@ namespace ts {
986
985
else {
987
986
tokenValue = result ;
988
987
const type = checkBigIntSuffix ( ) ; // if value is an integer, check whether it is a bigint
989
- checkForIdentifierAfterNumericLiteral ( ) ;
988
+ checkForIdentifierStartAfterNumericLiteral ( ) ;
990
989
return { type, value : tokenValue } ;
991
990
}
992
991
}
993
992
994
- function checkForIdentifierAfterNumericLiteral ( ) {
993
+ function checkForIdentifierStartAfterNumericLiteral ( ) {
995
994
if ( isIdentifierStart ( text . charCodeAt ( pos ) , languageVersion ) ) {
996
995
error ( Diagnostics . An_identifier_cannot_follow_a_numeric_literal , pos , 1 ) ;
997
996
}
You can’t perform that action at this time.
0 commit comments