This commit is contained in:
Florian Schroedl
2022-01-20 17:00:00 +01:00
parent 0d19b846f2
commit aebd570a37
7 changed files with 237 additions and 7 deletions

22
src/types.nim Normal file
View File

@@ -0,0 +1,22 @@
import print
type
orgElementContent = string
orgElementChildren = seq[OrgElement]
OrgElementKind = enum
orgDocument,
orgHeadline,
orgText,
OrgElement = ref object
children*: orgElementChildren
case kind*: OrgElementKind
of orgHeadline:
level*: int
of orgText:
content: orgElementContent
of orgDocument: discard
let emptyChildrenSeq: orgElementChildren = newSeq[OrgElement]()