示例#1
0
文件: mdcodegen.py 项目: beala/lamark
 def generate(self, lamark_ast):
     self._init_plugins()
     md_ast = lmast.map_postorder(lamark_ast, self.gen_dispatch)
     md_string = ""
     for md_node in md_ast.doc:
         md_string += md_node.string
     self._tear_down_plugins()
     return md_string
示例#2
0
文件: tagparser.py 项目: beala/lamark
 def parse(self, ast):
     """Parses the tags of the nodes in a LaMark AST."""
     parsed_ast = lmast.map_postorder(ast, self.tag_parse_dispatch)
     return parsed_ast