blob: d99b2fed0d6043f46860a56a394d5c8393944618 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
type ParseError* = enum
#TODO write a description for all error codes
ABRUPT_CLOSING_OF_EMPTY_COMMENT
ABRUPT_DOCTYPE_PUBLIC_IDENTIFIER
ABRUPT_DOCTYPE_SYSTEM_IDENTIFIER
ABSENCE_OF_DIGITS_IN_NUMERIC_CHARACTER_REFERENCE
CDATA_IN_HTML_CONTENT
CHARACTER_REFERENCE_OUTSIDE_UNICODE_RANGE
CONTROL_CHARACTER_IN_INPUT_STREAM
CONTROL_CHARACTER_REFERENCE
END_TAG_WITH_ATTRIBUTES
DUPLICATE_ATTRIBUTE
END_TAG_WITH_TRAILING_SOLIDUS
EOF_BEFORE_TAG_NAME
EOF_IN_CDATA
EOF_IN_COMMENT
EOF_IN_DOCTYPE
EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT
EOF_IN_TAG
INCORRECTLY_CLOSED_COMMENT
INCORRECTLY_OPENED_COMMENT
INVALID_CHARACTER_SEQUENCE_AFTER_DOCTYPE_NAME
INVALID_FIRST_CHARACTER_OF_TAG_NAME
MISSING_ATTRIBUTE_VALUE
MISSING_DOCTYPE_NAME
MISSING_DOCTYPE_PUBLIC_IDENTIFIER
MISSING_DOCTYPE_SYSTEM_IDENTIFIER
MISSING_END_TAG_NAME
MISSING_QUOTE_BEFORE_DOCTYPE_PUBLIC_IDENTIFIER
MISSING_QUOTE_BEFORE_DOCTYPE_SYSTEM_IDENTIFIER
MISSING_SEMICOLON_AFTER_CHARACTER_REFERENCE
MISSING_WHITESPACE_AFTER_DOCTYPE_PUBLIC_KEYWORD
MISSING_WHITESPACE_AFTER_DOCTYPE_SYSTEM_KEYWORD
MISSING_WHITESPACE_BEFORE_DOCTYPE_NAME
MISSING_WHITESPACE_BETWEEN_ATTRIBUTES
MISSING_WHITESPACE_BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS
NESTED_COMMENT
NONCHARACTER_CHARACTER_REFERENCE
NONCHARACTER_IN_INPUT_STREAM
NON_VOID_HTML_ELEMENT_START_TAG_WITH_TRAILING_SOLIDUS
NULL_CHARACTER_REFERENCE
SURROGATE_CHARACTER_REFERENCE
SURROGATE_IN_INPUT_STREAM
UNEXPECTED_CHARACTER_AFTER_DOCTYPE_SYSTEM_IDENTIFIER
UNEXPECTED_CHARACTER_IN_ATTRIBUTE_NAME
UNEXPECTED_CHARACTER_IN_UNQUOTED_ATTRIBUTE_VALUE
UNEXPECTED_EQUALS_SIGN_BEFORE_ATTRIBUTE_NAME
UNEXPECTED_NULL_CHARACTER
UNEXPECTED_QUESTION_MARK_INSTEAD_OF_TAG_NAME
UNEXPECTED_SOLIDUS_IN_TAG
UNKNOWN_NAMED_CHARACTER_REFERENCE
LAST_SPECIFIED_ERROR # never returned
# From here on, error code names have not been specified by the standard.
MISMATCHED_TAGS = "Mismatched start and end tags"
INVALID_DOCTYPE = "Unrecognized document type"
UNEXPECTED_DOCTYPE = "Unexpected document type"
UNEXPECTED_INITIAL_TOKEN = "Unexpected token in initial state"
UNEXPECTED_START_TAG = "Unexpected start tag"
UNEXPECTED_END_TAG = "Unexpected end tag"
ELEMENT_NOT_IN_OPEN_ELEMENTS = "Element has not been added to open elements"
ELEMENT_NOT_IN_SCOPE = "Element not in appropriate scope"
ELEMENT_NOT_CURRENT_NODE = "Element is not current node"
#TODO merge with UNEXPECTED_NULL_CHARACTER?
UNEXPECTED_NULL = "Unexpected null character"
NESTED_TAGS = "Non-nestable nested tags"
UNEXPECTED_SPECIAL_ELEMENT = "Unexpected special element on open elements"
UNEXPECTED_EOF = "Unexpected end of file"
INVALID_TEXT_PARENT = "Invalid parent element for text node"
NON_SPACE_TABLE_TEXT = "Non-space table text"
UNEXPECTED_AFTER_BODY_TOKEN = "Unexpected token after body"
|