#!/usr/bin/env python """ The J markup language """ # TODO: # Of course, JML should be broken into discrete files as follows function. ### block types class Block(object): """ the abstract notion of a block of text; this is a hierarchy """ def __init__(self, block, parent=None): self.block = block # naively store the full text for now self.parent = parent # the parent block self.children = [] # child blocks def level(self): """(global) nesting level this instance is at""" if self.parent is None: return 0 return self.parent.levels() + 1 def split(self): """ split the text: >>> text = '\nthis is a\nparagraph """ ### command line handling def main(args=sys.argv[1:]): pass if __name__ == '__main__': main()