diff options
author | bptato <nincsnevem662@gmail.com> | 2024-03-21 17:57:41 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-03-21 17:58:02 +0100 |
commit | 4a897f27bbfb114f256890eb70c4d7e053f0e19b (patch) | |
tree | c6e09064bb172f36ffbaab8d4eec2f8658e6c1af /src/html/catom.nim | |
parent | 9ff343c860fa4b109e139579146246b9a0d7a298 (diff) | |
download | chawan-4a897f27bbfb114f256890eb70c4d7e053f0e19b.tar.gz |
catom: at -> sat
just for consistency
Diffstat (limited to 'src/html/catom.nim')
-rw-r--r-- | src/html/catom.nim | 123 |
1 files changed, 59 insertions, 64 deletions
diff --git a/src/html/catom.nim b/src/html/catom.nim index 1bb6cc8c..5e5f6174 100644 --- a/src/html/catom.nim +++ b/src/html/catom.nim @@ -11,64 +11,64 @@ macro makeStaticAtom = # declare inside the macro to avoid confusion with StaticAtom0 type StaticAtom0 = enum - atAcceptCharset = "accept-charset" - atAction = "action" - atAlign = "align" - atAlt = "alt" - atAsync = "async" - atBgcolor = "bgcolor" - atBlocking = "blocking" - atCharset = "charset" - atChecked = "checked" - atClass = "class" - atClassList - atColor = "color" - atCols = "cols" - atColspan = "colspan" - atCrossorigin = "crossorigin" - atDefer = "defer" - atDirname = "dirname" - atDisabled = "disabled" - atEnctype = "enctype" - atEvent = "event" - atFor = "for" - atForm = "form" - atFormaction = "formaction" - atFormenctype = "formenctype" - atFormmethod = "formmethod" - atHeight = "height" - atHref = "href" - atId = "id" - atIntegrity = "integrity" - atIsmap = "ismap" - atLanguage = "language" - atMedia = "media" - atMethod = "method" - atMultiple = "multiple" - atName = "name" - atNomodule = "nomodule" - atOnload = "onload" - atReferrerpolicy = "referrerpolicy" - atRel = "rel" - atRequired = "required" - atRows = "rows" - atRowspan = "rowspan" - atSelected = "selected" - atSize = "size" - atSizes = "sizes" - atSlot = "slot" - atSrc = "src" - atSrcset = "srcset" - atStyle = "style" - atStylesheet = "stylesheet" - atTarget = "target" - atText = "text" - atTitle = "title" - atType = "type" - atUsemap = "usemap" - atValign = "valign" - atValue = "value" - atWidth = "width" + satAcceptCharset = "accept-charset" + satAction = "action" + satAlign = "align" + satAlt = "alt" + satAsync = "async" + satBgcolor = "bgcolor" + satBlocking = "blocking" + satCharset = "charset" + satChecked = "checked" + satClass = "class" + satClassList + satColor = "color" + satCols = "cols" + satColspan = "colspan" + satCrossorigin = "crossorigin" + satDefer = "defer" + satDirname = "dirname" + satDisabled = "disabled" + satEnctype = "enctype" + satEvent = "event" + satFor = "for" + satForm = "form" + satFormaction = "formaction" + satFormenctype = "formenctype" + satFormmethod = "formmethod" + satHeight = "height" + satHref = "href" + satId = "id" + satIntegrity = "integrity" + satIsmap = "ismap" + satLanguage = "language" + satMedia = "media" + satMethod = "method" + satMultiple = "multiple" + satName = "name" + satNomodule = "nomodule" + satOnload = "onload" + satReferrerpolicy = "referrerpolicy" + satRel = "rel" + satRequired = "required" + satRows = "rows" + satRowspan = "rowspan" + satSelected = "selected" + satSize = "size" + satSizes = "sizes" + satSlot = "slot" + satSrc = "src" + satSrcset = "srcset" + satStyle = "style" + satStylesheet = "stylesheet" + satTarget = "target" + satText = "text" + satTitle = "title" + satType = "type" + satUsemap = "usemap" + satValign = "valign" + satValue = "value" + satWidth = "width" let decl = quote do: type StaticAtom* {.inject.} = enum atUnknown = "" @@ -78,12 +78,7 @@ macro makeStaticAtom = if t == TAG_UNKNOWN: continue let tn = $t - var name = "at" - name &= tn[0].toUpperAscii() - name &= tn.substr(1) - if name == "atTr": - # Nim cries about this overlapping with the attr() procs :/ - name = "satTr" + let name = "sat" & tn[0].toUpperAscii() & tn.substr(1) seen.incl(tn) decl0.add(newNimNode(nnkEnumFieldDef).add(ident(name), newStrLitNode(tn))) for i, f in StaticAtom0.getType(): |