diff --git a/html/highlighter.ts b/html/highlighter.ts index 08576fb..91c783e 100644 --- a/html/highlighter.ts +++ b/html/highlighter.ts @@ -40,7 +40,7 @@ export class Highlighter { this.createNode({ position: { line: 0, character: 0 }, color: Palette.Plain, content: '' }); this.reconsumeIn(State.Plain); break; - default: VERIFY_NOT_REACHED(); + default: VERIFY_NOT_REACHED(this.currentToken.type); } break; @@ -113,7 +113,7 @@ export class Highlighter { case Type.EndTag: this.emitNode({ position: { line: 0, character: 0 }, color: Palette.Punctuator, content: '>' }); break; - default: throw new Error('AfterAttributes got ' + JSON.stringify(this.currentToken)); + default: VERIFY_NOT_REACHED(this.currentToken.type); } break; @@ -124,7 +124,7 @@ export class Highlighter { this.createNode({ position: { line: 0, character: 0 }, color: Palette.String, content: '' }); this.reconsumeIn(State.Script); break; - default: throw new Error('BeforeScript') + default: VERIFY_NOT_REACHED(this.currentToken.type); } break;