def build_node(self): lnode = UnOrderedListNode() for anyone in self.get_collection(): inode = ListItemNode() inode.add_node(node(anyone)) lnode.add_node(inode) return lnode
def parse(self, stream): cstream = CacheStream(stream) root = RootBuilder() builder = None while not cstream.is_eof(): bu = self.parse_line(cstream) if bu: if builder: if builder.is_mergeable(bu): builder = builder.merge(bu) elif bu.is_mergeable(builder): builder = bu.merge(builder) else: root.add(builder) builder = bu else: builder = bu else: if builder: root.add(builder) builder = bu else: pass if builder: root.add(builder) return node(root)
def build_node(self): rnode = RootNode() for anyone in self.get_collection(): rnode.add_node(node(anyone)) return rnode
def build_node(self): cnode = CollectionNode() for anyone in self.get_collection(): cnode.add_node(node(anyone)) return cnode
def build_node(self): pnode = QuotationNode(cite=self.cite) for anyone in self.get_collection(): pnode.add_node(node(anyone)) return pnode
def build_node(self): pnode = ParagraphNode() for anyone in self.get_collection(): pnode.add_node(node(anyone)) return pnode.trim()
def build_node(self): hnode = HeadingNode(self.hnum) for anyone in self.get_collection(): hnode.add_node(node(anyone)) return hnode