From 4df112cf44715f0140eda8c81fa889a5f66bc4f6 Mon Sep 17 00:00:00 2001 From: Brandon Dyck Date: Thu, 21 Mar 2019 22:28:04 -0600 Subject: [PATCH] Documented code generators --- internal/attribgen/README.md | 11 +++++++++++ internal/elementgen/README.md | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 internal/attribgen/README.md create mode 100644 internal/elementgen/README.md diff --git a/internal/attribgen/README.md b/internal/attribgen/README.md new file mode 100644 index 0000000..d4f8737 --- /dev/null +++ b/internal/attribgen/README.md @@ -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`). diff --git a/internal/elementgen/README.md b/internal/elementgen/README.md new file mode 100644 index 0000000..60b204e --- /dev/null +++ b/internal/elementgen/README.md @@ -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').