Create an org heading builder
This commit is contained in:
45
docs/spec.org
Normal file
45
docs/spec.org
Normal file
@@ -0,0 +1,45 @@
|
||||
#+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
|
||||
Reference in New Issue
Block a user