46 lines
619 B
Org Mode
46 lines
619 B
Org Mode
#+TITLE: Spec
|
|
|
|
|
|
* Specs
|
|
|
|
[[https://nim-lang.org/docs/oids.html][std/oids]] :: ~genOid~
|
|
|
|
Takes bunch of builders
|
|
|
|
#+begin_src
|
|
DocumentBuilderResult(
|
|
id = (oid)
|
|
children: seq[OrgItem]
|
|
)
|
|
|
|
Heading = (
|
|
stars
|
|
)
|
|
|
|
OrgHeadingChild =
|
|
| Paragraph
|
|
|
|
OrgItem =
|
|
| OrgHeadingChild
|
|
| Heading
|
|
|
|
Heading(
|
|
id (oid)
|
|
parentId (oid)
|
|
children: seq[OrgHeadingChild]
|
|
)
|
|
|
|
#+end_src
|
|
|
|
Headline Builder
|
|
Paragraph Builder
|
|
Newline builder
|
|
List
|
|
|
|
|
|
We need something that parses continously until a stop function is hit
|
|
|
|
for heading it is newline stars parsers for instance
|
|
|
|
We need a new tryParseBuild function that tries a bunch of builders
|