From a2272230e2b82070f4e0571c62a45958ae788f62 Mon Sep 17 00:00:00 2001 From: "Glenn Y. Rolland" Date: Thu, 27 Apr 2023 20:48:19 +0200 Subject: [PATCH] feat(write): Add content nodes support --- src/write/nodes/root_node.cr | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 src/write/nodes/root_node.cr diff --git a/src/write/nodes/root_node.cr b/src/write/nodes/root_node.cr new file mode 100644 index 0000000..a0fb162 --- /dev/null +++ b/src/write/nodes/root_node.cr @@ -0,0 +1,46 @@ + +require "./module" + +module DocMachine::Write::Nodes + class RootNode + property context : String = "" + property audience : String = "" + property goals : String = "" + property constraints : String = "" + property chapters = [] of ChapterNode + + def build_chapters() + [] of ChapterNode + end + end + + class ChapterNode + property sections = [] of SectionNode + + def build_sections() + [] of SectionNode + end + end + + class SectionNode + property subsections = [] of SubsectionNode + + def build_subsections() + [] of SubsectionNode + end + end + + class SubsectionNode + property content = [] of String + + def build_content() + [] of String + end + + def fix_content() + [] of String + end + end +end + +