Skip to content

Commit 9c48b23

Browse files
Fix spelling mistakes, and remove unused function.
1 parent 7ab80d2 commit 9c48b23

File tree

1 file changed

+4
-31
lines changed

1 file changed

+4
-31
lines changed

src/services/syntax/parser.ts

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,14 +1081,14 @@ module TypeScript.Parser {
10811081

10821082
function parseAccessor(): IAccessorSyntax {
10831083
var modifiers = parseModifiers();
1084-
var _currenToken = currentToken();
1085-
var tokenKind = _currenToken.kind;
1084+
var _currentToken = currentToken();
1085+
var tokenKind = _currentToken.kind;
10861086

10871087
if (tokenKind === SyntaxKind.GetKeyword) {
1088-
return parseGetAccessor(modifiers, _currenToken);
1088+
return parseGetAccessor(modifiers, _currentToken);
10891089
}
10901090
else if (tokenKind === SyntaxKind.SetKeyword) {
1091-
return parseSetAccessor(modifiers, _currenToken);
1091+
return parseSetAccessor(modifiers, _currentToken);
10921092
}
10931093
else {
10941094
throw Errors.invalidOperation();
@@ -3447,33 +3447,6 @@ module TypeScript.Parser {
34473447
eatToken(SyntaxKind.CloseBracketToken));
34483448
}
34493449

3450-
function tryAddUnexpectedEqualsGreaterThanToken(callSignature: CallSignatureSyntax): boolean {
3451-
var token0 = currentToken();
3452-
3453-
var hasEqualsGreaterThanToken = token0.kind === SyntaxKind.EqualsGreaterThanToken;
3454-
if (hasEqualsGreaterThanToken) {
3455-
// We can only do this if the call signature actually contains a final token that we
3456-
// could add the => to.
3457-
var _lastToken = lastToken(callSignature);
3458-
if (_lastToken && _lastToken.fullWidth() > 0) {
3459-
// Previously the language allowed "function f() => expr;" as a shorthand for
3460-
// "function f() { return expr; }.
3461-
//
3462-
// Detect if the user is typing this and attempt recovery.
3463-
var diagnostic = new Diagnostic(fileName, source.text.lineMap(),
3464-
start(token0, source.text), width(token0), DiagnosticCode.Unexpected_token_0_expected, [SyntaxFacts.getText(SyntaxKind.OpenBraceToken)]);
3465-
addDiagnostic(diagnostic);
3466-
3467-
// Skip over the => It will get attached to whatever comes next.
3468-
skipToken(token0);
3469-
return true;
3470-
}
3471-
}
3472-
3473-
3474-
return false;
3475-
}
3476-
34773450
function parseStatementBlock(): BlockSyntax {
34783451
// Different from function blocks in that we don't check for strict mode, nor do accept
34793452
// a block without an open curly.

0 commit comments

Comments
 (0)