Line data Source code
1 : /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2 : |* *|
3 : |* HTML tag properties *|
4 : |* *|
5 : |* Automatically generated file, do not edit! *|
6 : |* *|
7 : \*===----------------------------------------------------------------------===*/
8 :
9 41 : bool isHTMLEndTagOptional(StringRef Name) {
10 41 : switch (Name.size()) {
11 : default: break;
12 39 : case 1: // 1 string to match.
13 39 : if (Name[0] != 'p')
14 : break;
15 : return true; // "p"
16 2 : case 2: // 6 strings to match.
17 : switch (Name[0]) {
18 : default: break;
19 0 : case 'd': // 2 strings to match.
20 : switch (Name[1]) {
21 : default: break;
22 : case 'd': // 1 string to match.
23 : return true; // "dd"
24 : case 't': // 1 string to match.
25 : return true; // "dt"
26 : }
27 : break;
28 0 : case 'l': // 1 string to match.
29 0 : if (Name[1] != 'i')
30 : break;
31 : return true; // "li"
32 0 : case 't': // 3 strings to match.
33 : switch (Name[1]) {
34 : default: break;
35 : case 'd': // 1 string to match.
36 : return true; // "td"
37 : case 'h': // 1 string to match.
38 : return true; // "th"
39 : case 'r': // 1 string to match.
40 : return true; // "tr"
41 : }
42 : break;
43 : }
44 : break;
45 0 : case 5: // 3 strings to match.
46 0 : if (Name[0] != 't')
47 : break;
48 : switch (Name[1]) {
49 : default: break;
50 : case 'b': // 1 string to match.
51 0 : if (memcmp(Name.data()+2, "ody", 3) != 0)
52 : break;
53 : return true; // "tbody"
54 : case 'f': // 1 string to match.
55 0 : if (memcmp(Name.data()+2, "oot", 3) != 0)
56 : break;
57 : return true; // "tfoot"
58 : case 'h': // 1 string to match.
59 0 : if (memcmp(Name.data()+2, "ead", 3) != 0)
60 : break;
61 : return true; // "thead"
62 : }
63 : break;
64 : case 8: // 1 string to match.
65 0 : if (memcmp(Name.data()+0, "colgroup", 8) != 0)
66 : break;
67 : return true; // "colgroup"
68 : }
69 : return false;
70 : }
71 :
72 132 : bool isHTMLEndTagForbidden(StringRef Name) {
73 132 : switch (Name.size()) {
74 : default: break;
75 30 : case 2: // 2 strings to match.
76 : switch (Name[0]) {
77 : default: break;
78 8 : case 'b': // 1 string to match.
79 8 : if (Name[1] != 'r')
80 : break;
81 : return true; // "br"
82 4 : case 'h': // 1 string to match.
83 4 : if (Name[1] != 'r')
84 : break;
85 : return true; // "hr"
86 : }
87 : break;
88 10 : case 3: // 2 strings to match.
89 : switch (Name[0]) {
90 : default: break;
91 : case 'c': // 1 string to match.
92 0 : if (memcmp(Name.data()+1, "ol", 2) != 0)
93 : break;
94 : return true; // "col"
95 : case 'i': // 1 string to match.
96 4 : if (memcmp(Name.data()+1, "mg", 2) != 0)
97 : break;
98 : return true; // "img"
99 : }
100 : break;
101 : }
102 : return false;
103 : }
104 :
|