UNPKG

4.51 kBTypeScriptView Raw
1import type { Location } from './token.js';
2export interface ParserError extends Location {
3 code: ERR;
4}
5export type ParserErrorHandler = (error: ParserError) => void;
6export declare enum ERR {
7 controlCharacterInInputStream = "control-character-in-input-stream",
8 noncharacterInInputStream = "noncharacter-in-input-stream",
9 surrogateInInputStream = "surrogate-in-input-stream",
10 nonVoidHtmlElementStartTagWithTrailingSolidus = "non-void-html-element-start-tag-with-trailing-solidus",
11 endTagWithAttributes = "end-tag-with-attributes",
12 endTagWithTrailingSolidus = "end-tag-with-trailing-solidus",
13 unexpectedSolidusInTag = "unexpected-solidus-in-tag",
14 unexpectedNullCharacter = "unexpected-null-character",
15 unexpectedQuestionMarkInsteadOfTagName = "unexpected-question-mark-instead-of-tag-name",
16 invalidFirstCharacterOfTagName = "invalid-first-character-of-tag-name",
17 unexpectedEqualsSignBeforeAttributeName = "unexpected-equals-sign-before-attribute-name",
18 missingEndTagName = "missing-end-tag-name",
19 unexpectedCharacterInAttributeName = "unexpected-character-in-attribute-name",
20 unknownNamedCharacterReference = "unknown-named-character-reference",
21 missingSemicolonAfterCharacterReference = "missing-semicolon-after-character-reference",
22 unexpectedCharacterAfterDoctypeSystemIdentifier = "unexpected-character-after-doctype-system-identifier",
23 unexpectedCharacterInUnquotedAttributeValue = "unexpected-character-in-unquoted-attribute-value",
24 eofBeforeTagName = "eof-before-tag-name",
25 eofInTag = "eof-in-tag",
26 missingAttributeValue = "missing-attribute-value",
27 missingWhitespaceBetweenAttributes = "missing-whitespace-between-attributes",
28 missingWhitespaceAfterDoctypePublicKeyword = "missing-whitespace-after-doctype-public-keyword",
29 missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers = "missing-whitespace-between-doctype-public-and-system-identifiers",
30 missingWhitespaceAfterDoctypeSystemKeyword = "missing-whitespace-after-doctype-system-keyword",
31 missingQuoteBeforeDoctypePublicIdentifier = "missing-quote-before-doctype-public-identifier",
32 missingQuoteBeforeDoctypeSystemIdentifier = "missing-quote-before-doctype-system-identifier",
33 missingDoctypePublicIdentifier = "missing-doctype-public-identifier",
34 missingDoctypeSystemIdentifier = "missing-doctype-system-identifier",
35 abruptDoctypePublicIdentifier = "abrupt-doctype-public-identifier",
36 abruptDoctypeSystemIdentifier = "abrupt-doctype-system-identifier",
37 cdataInHtmlContent = "cdata-in-html-content",
38 incorrectlyOpenedComment = "incorrectly-opened-comment",
39 eofInScriptHtmlCommentLikeText = "eof-in-script-html-comment-like-text",
40 eofInDoctype = "eof-in-doctype",
41 nestedComment = "nested-comment",
42 abruptClosingOfEmptyComment = "abrupt-closing-of-empty-comment",
43 eofInComment = "eof-in-comment",
44 incorrectlyClosedComment = "incorrectly-closed-comment",
45 eofInCdata = "eof-in-cdata",
46 absenceOfDigitsInNumericCharacterReference = "absence-of-digits-in-numeric-character-reference",
47 nullCharacterReference = "null-character-reference",
48 surrogateCharacterReference = "surrogate-character-reference",
49 characterReferenceOutsideUnicodeRange = "character-reference-outside-unicode-range",
50 controlCharacterReference = "control-character-reference",
51 noncharacterCharacterReference = "noncharacter-character-reference",
52 missingWhitespaceBeforeDoctypeName = "missing-whitespace-before-doctype-name",
53 missingDoctypeName = "missing-doctype-name",
54 invalidCharacterSequenceAfterDoctypeName = "invalid-character-sequence-after-doctype-name",
55 duplicateAttribute = "duplicate-attribute",
56 nonConformingDoctype = "non-conforming-doctype",
57 missingDoctype = "missing-doctype",
58 misplacedDoctype = "misplaced-doctype",
59 endTagWithoutMatchingOpenElement = "end-tag-without-matching-open-element",
60 closingOfElementWithOpenChildElements = "closing-of-element-with-open-child-elements",
61 disallowedContentInNoscriptInHead = "disallowed-content-in-noscript-in-head",
62 openElementsLeftAfterEof = "open-elements-left-after-eof",
63 abandonedHeadElementChild = "abandoned-head-element-child",
64 misplacedStartTagForHeadElement = "misplaced-start-tag-for-head-element",
65 nestedNoscriptInHead = "nested-noscript-in-head",
66 eofInElementThatCanContainOnlyText = "eof-in-element-that-can-contain-only-text"
67}
68//# sourceMappingURL=error-codes.d.ts.map
\No newline at end of file