Documented code generators

This commit is contained in:
Brandon Dyck 2019-03-21 22:28:04 -06:00
parent 1e23de1266
commit 4df112cf44
2 changed files with 22 additions and 0 deletions

View File

@ -0,0 +1,11 @@
# attribgen
attribgen reads simple descriptions of HTML element attributes from
`attribs.txt` and generates Go functions to create them. The file contains
one description per line. Each description is in the form
```
attribute-name attribute-type
```
where `attribute-name` is the lowercase name of the attribute, and
`attribute-type` is either `string` for normal attributes (e.g. `id`, 'style')
or `bool` for boolean attributes (e.g. `disabled`).

View File

@ -0,0 +1,11 @@
# elementgen
elementgen reads simple descriptions of HTML elements from `elements.txt`
and generates Go functions to create them. The file contains one description
per line. Each description is in the form
```
tag-name element-type
```
where `tag-name` is the lowercase name of the element, and `element-type` is
either `empty` for empty elements (e.g. `img`, 'br') or `parent` for elements
that can have child nodes (e.g. 'div', 'body').