parserino.names

Names of tags, attributes and namespaces.

Known names have a fixed id (Tag, AttrName); other names get an id when a document meets them (see NameTable). Generated by tools/gen/gen_names.d.

The lists come from the HTML Living Standard (https://html.spec.whatwg.org/), see tools/gen/spec.d.

Types 5

enumNs : ubyte

Namespaces. None is no namespace (as for most attributes); nothing uses Any.

None
Any
Html
Math
Svg
Xlink
Xml
Xmlns
enumTag : uint

Known tags. Unknown tag names get ids from Tag.Last on. The members are the names in PascalCase (annotation-xml is AnnotationXml); Undef (no tag), EndOfFile and the ...Node members name the nodes that are not elements.

Undef = 0
EndOfFile = 1
TextNode = 2
DocumentNode = 3
CommentNode = 4
DoctypeNode = 5
ProcessingInstructionNode = 6
A = 7
Abbr = 8
Acronym = 9
Address = 10
Altglyph = 11
Altglyphdef = 12
Altglyphitem = 13
Animatecolor = 14
Animatemotion = 15
Animatetransform = 16
AnnotationXml = 17
Applet = 18
Area = 19
Article = 20
Aside = 21
Audio = 22
B = 23
Base = 24
Basefont = 25
Bdi = 26
Bdo = 27
Bgsound = 28
Big = 29
Blink = 30
Blockquote = 31
Body = 32
Br = 33
Button = 34
Canvas = 35
Caption = 36
Center = 37
Cite = 38
Clippath = 39
Code = 40
Col = 41
Colgroup = 42
Data = 43
Datalist = 44
Dd = 45
Del = 46
Desc = 47
Details = 48
Dfn = 49
Dialog = 50
Dir = 51
Div = 52
Dl = 53
Dt = 54
Em = 55
Embed = 56
Feblend = 57
Fecolormatrix = 58
Fecomponenttransfer = 59
Fecomposite = 60
Feconvolvematrix = 61
Fediffuselighting = 62
Fedisplacementmap = 63
Fedistantlight = 64
Fedropshadow = 65
Feflood = 66
Fefunca = 67
Fefuncb = 68
Fefuncg = 69
Fefuncr = 70
Fegaussianblur = 71
Feimage = 72
Femerge = 73
Femergenode = 74
Femorphology = 75
Feoffset = 76
Fepointlight = 77
Fespecularlighting = 78
Fespotlight = 79
Fetile = 80
Feturbulence = 81
Fieldset = 82
Figcaption = 83
Figure = 84
Font = 85
Footer = 86
Foreignobject = 87
Form = 88
Frame = 89
Frameset = 90
Glyphref = 91
H1 = 92
H2 = 93
H3 = 94
H4 = 95
H5 = 96
H6 = 97
Head = 98
Header = 99
Hgroup = 100
Hr = 101
Html = 102
I = 103
Iframe = 104
Image = 105
Img = 106
Input = 107
Ins = 108
Isindex = 109
Kbd = 110
Keygen = 111
Label = 112
Legend = 113
Li = 114
Lineargradient = 115
Link = 116
Listing = 117
Main = 118
Malignmark = 119
Map = 120
Mark = 121
Marquee = 122
Math = 123
Menu = 124
Menuitem = 125
Meta = 126
Meter = 127
Mglyph = 128
Mi = 129
Mn = 130
Mo = 131
Ms = 132
Mtext = 133
Multicol = 134
Nav = 135
Nextid = 136
Nobr = 137
Noembed = 138
Noframes = 139
Noscript = 140
Object = 141
Ol = 142
Optgroup = 143
Option = 144
Output = 145
P = 146
Param = 147
Picture = 148
Plaintext = 149
Pre = 150
Progress = 151
Q = 152
Radialgradient = 153
Rb = 154
Rp = 155
Rt = 156
Rtc = 157
Ruby = 158
S = 159
Samp = 160
Script = 161
Search = 162
Section = 163
Select = 164
Selectedcontent = 165
Slot = 166
Small = 167
Source = 168
Spacer = 169
Span = 170
Strike = 171
Strong = 172
Style = 173
Sub = 174
Summary = 175
Sup = 176
Svg = 177
Table = 178
Tbody = 179
Td = 180
Template = 181
Textarea = 182
Textpath = 183
Tfoot = 184
Th = 185
Thead = 186
Time = 187
Title = 188
Tr = 189
Track = 190
Tt = 191
U = 192
Ul = 193
Var = 194
Video = 195
Wbr = 196
Xmp = 197
Last = 198
enumCategory : ubyte

Categories of the tags in the tree construction ("special", "formatting", scopes, ...)

Ordinary = 0x01
Special = 0x02
Formatting = 0x04
Scope = 0x08
ScopeListItem = 0x10
ScopeButton = 0x20
ScopeTable = 0x40
enumAttrName : uint

Known attributes. Unknown names get ids from AttrName.Last on. The members are the names in PascalCase (accept-charset is AcceptCharset); Undef is no attribute.

Undef = 0
Abbr = 1
Accept = 2
AcceptCharset = 3
Accesskey = 4
Action = 5
Align = 6
Alink = 7
Allow = 8
Allowfullscreen = 9
Alpha = 10
Alt = 11
As = 12
Async = 13
Autocapitalize = 14
Autocomplete = 15
Autocorrect = 16
Autofocus = 17
Autoplay = 18
Axis = 19
Bgcolor = 20
Blocking = 21
Charset = 22
Checked = 23
Cite = 24
Class = 25
Clear = 26
Closedby = 27
Codetype = 28
Color = 29
Colorspace = 30
Cols = 31
Colspan = 32
Command = 33
Commandfor = 34
Compact = 35
Content = 36
Contenteditable = 37
Controls = 38
Coords = 39
Crossorigin = 40
Data = 41
Datetime = 42
Declare = 43
Decoding = 44
Default = 45
Defer = 46
Dir = 47
Direction = 48
Dirname = 49
Disabled = 50
Download = 51
Draggable = 52
Enctype = 53
Enterkeyhint = 54
Face = 55
Fetchpriority = 56
For = 57
Form = 58
Formaction = 59
Formenctype = 60
Formmethod = 61
Formnovalidate = 62
Formtarget = 63
Frame = 64
Headers = 65
Headingoffset = 66
Headingreset = 67
Height = 68
Hidden = 69
High = 70
Href = 71
Hreflang = 72
HttpEquiv = 73
Id = 74
Imagesizes = 75
Imagesrcset = 76
Inert = 77
Inputmode = 78
Integrity = 79
Is = 80
Ismap = 81
Itemid = 82
Itemprop = 83
Itemref = 84
Itemscope = 85
Itemtype = 86
Kind = 87
Label = 88
Lang = 89
Language = 90
Link = 91
List = 92
Loading = 93
Loop = 94
Low = 95
Max = 96
Maxlength = 97
Media = 98
Method = 99
Min = 100
Minlength = 101
Multiple = 102
Muted = 103
Name = 104
Nohref = 105
Nomodule = 106
Nonce = 107
Noresize = 108
Noshade = 109
Novalidate = 110
Nowrap = 111
Open = 112
Optimum = 113
Pattern = 114
Ping = 115
Placeholder = 116
Playsinline = 117
Popover = 118
Popovertarget = 119
Popovertargetaction = 120
Poster = 121
Preload = 122
Readonly = 123
Referrerpolicy = 124
Rel = 125
Required = 126
Rev = 127
Reversed = 128
Rows = 129
Rowspan = 130
Rules = 131
Sandbox = 132
Scope = 133
Scrolling = 134
Selected = 135
Shadowrootclonable = 136
Shadowrootcustomelementregistry = 137
Shadowrootdelegatesfocus = 138
Shadowrootmode = 139
Shadowrootserializable = 140
Shadowrootslotassignment = 141
Shape = 142
Size = 143
Sizes = 144
Slot = 145
Span = 146
Spellcheck = 147
Src = 148
Srcdoc = 149
Srclang = 150
Srcset = 151
Start = 152
Step = 153
Style = 154
Tabindex = 155
Target = 156
Text = 157
Title = 158
Translate = 159
Type = 160
Usemap = 161
Valign = 162
Value = 163
Valuetype = 164
Vlink = 165
Width = 166
Wrap = 167
Writingsuggestions = 168
Last = 169
structNameTable

Interned names of a document: known names have their static id, the others get new ids (from first on) the first time they are seen.

Methods
uint intern(scope const(char)[] name, ref Arena arena, uint first) @nogc nothrow pure @safeId of `name`, adding it if needed. It returns 0 if out of memory.
uint find(scope const(char)[] name, uint first) @nogc nothrow pure @safe constId of `name` if already interned, else 0
const(char)[] name(uint id, uint first) @nogc nothrow pure @safe constName of an id (from `first` on)
Destructors
Nested Templates
Entry

Functions 3

fnTag knownTag(scope const(char)[] name) @nogc nothrow pure @safe @trustedId of a known tag (`name` must be lowercase), or `Tag.Undef`
fnAttrName knownAttr(scope const(char)[] name) @nogc nothrow pure @safe @trustedId of a known attribute (`name` must be lowercase), or `AttrName.Undef`
fnsize_t hash(scope const(char)[] s) @nogc nothrow pure @safeFNV-1a

Variables 3

varstring[Tag.Last] tagNames

Names of the known tags (lowercase)

varubyte[Ns.max + 1][Tag.Last] tagCategories

Categories of each tag, for each namespace

varstring[AttrName.Last] attrNames

Names of the known attributes

Templates 1

tmplstaticLookup(alias names)
Functions
uint staticLookup(scope const(char)[] name)