Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
TokenizerState
n/a
0 / 0
n/a
0 / 0
0
n/a
0 / 0
1<?php
2
3declare(strict_types=1);
4
5namespace Phpdftk\Html\Tokenizer;
6
7/**
8 * Every state defined by WHATWG HTML §13.2.5. The enum cases are declared
9 * upfront so the tokenizer's state-set is enumerable and we can wire up
10 * "tokenizer state changes by tree construction" cleanly (tree construction
11 * for <script>, <textarea>, <title>, etc. flips the tokenizer into a
12 * special state). Not every state is implemented at Phase 1B.2 — see the
13 * `Tokenizer` source for the staged implementation.
14 */
15enum TokenizerState
16{
17    case Data;
18    case Rcdata;
19    case Rawtext;
20    case ScriptData;
21    case Plaintext;
22    case TagOpen;
23    case EndTagOpen;
24    case TagName;
25    case RcdataLessThanSign;
26    case RcdataEndTagOpen;
27    case RcdataEndTagName;
28    case RawtextLessThanSign;
29    case RawtextEndTagOpen;
30    case RawtextEndTagName;
31    case ScriptDataLessThanSign;
32    case ScriptDataEndTagOpen;
33    case ScriptDataEndTagName;
34    case ScriptDataEscapeStart;
35    case ScriptDataEscapeStartDash;
36    case ScriptDataEscaped;
37    case ScriptDataEscapedDash;
38    case ScriptDataEscapedDashDash;
39    case ScriptDataEscapedLessThanSign;
40    case ScriptDataEscapedEndTagOpen;
41    case ScriptDataEscapedEndTagName;
42    case ScriptDataDoubleEscapeStart;
43    case ScriptDataDoubleEscaped;
44    case ScriptDataDoubleEscapedDash;
45    case ScriptDataDoubleEscapedDashDash;
46    case ScriptDataDoubleEscapedLessThanSign;
47    case ScriptDataDoubleEscapeEnd;
48    case BeforeAttributeName;
49    case AttributeName;
50    case AfterAttributeName;
51    case BeforeAttributeValue;
52    case AttributeValueDoubleQuoted;
53    case AttributeValueSingleQuoted;
54    case AttributeValueUnquoted;
55    case AfterAttributeValueQuoted;
56    case SelfClosingStartTag;
57    case BogusComment;
58    case MarkupDeclarationOpen;
59    case CommentStart;
60    case CommentStartDash;
61    case Comment;
62    case CommentLessThanSign;
63    case CommentLessThanSignBang;
64    case CommentLessThanSignBangDash;
65    case CommentLessThanSignBangDashDash;
66    case CommentEndDash;
67    case CommentEnd;
68    case CommentEndBang;
69    case Doctype;
70    case BeforeDoctypeName;
71    case DoctypeName;
72    case AfterDoctypeName;
73    case AfterDoctypePublicKeyword;
74    case BeforeDoctypePublicIdentifier;
75    case DoctypePublicIdentifierDoubleQuoted;
76    case DoctypePublicIdentifierSingleQuoted;
77    case AfterDoctypePublicIdentifier;
78    case BetweenDoctypePublicAndSystemIdentifiers;
79    case AfterDoctypeSystemKeyword;
80    case BeforeDoctypeSystemIdentifier;
81    case DoctypeSystemIdentifierDoubleQuoted;
82    case DoctypeSystemIdentifierSingleQuoted;
83    case AfterDoctypeSystemIdentifier;
84    case BogusDoctype;
85    case CdataSection;
86    case CdataSectionBracket;
87    case CdataSectionEnd;
88    case CharacterReference;
89    case NamedCharacterReference;
90    case AmbiguousAmpersand;
91    case NumericCharacterReference;
92    case HexadecimalCharacterReferenceStart;
93    case DecimalCharacterReferenceStart;
94    case HexadecimalCharacterReference;
95    case DecimalCharacterReference;
96    case NumericCharacterReferenceEnd;
97}