Skip to content

Commit 83fa58a

Browse files
committed
fix parser
1 parent 1554258 commit 83fa58a

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

src/diagnostics.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ export abstract class DiagnosticEmitter {
454454
arg1: string | null = null,
455455
arg2: string | null = null
456456
): void {
457+
console.trace()
457458
this.emitDiagnostic(code, DiagnosticCategory.Error, range, null, arg0, arg1, arg2);
458459
}
459460

src/parser.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2379,11 +2379,6 @@ export class Parser extends DiagnosticEmitter {
23792379
if (tn.skip(Token.Colon)) {
23802380
type = this.parseType(tn);
23812381
if (!type) return null;
2382-
} else {
2383-
this.error(
2384-
DiagnosticCode.Type_expected,
2385-
tn.range()
2386-
); // recoverable
23872382
}
23882383
let initializer: Expression | null = null;
23892384
if (tn.skip(Token.Equals)) {

0 commit comments

Comments
 (0)