40 lines
651 B
Nim
40 lines
651 B
Nim
import std/sugar
|
|
import std/collections/sequtils
|
|
import std/strformat
|
|
import std/strutils
|
|
import results
|
|
import fusion/matching
|
|
import ./org_types
|
|
import ./org_builder
|
|
import ./org_text_link
|
|
import ../utils/fp
|
|
import ../parser/parser_internals
|
|
import ../parser/parser_types
|
|
import ../parser/builder_api
|
|
|
|
when isMainModule:
|
|
let test = initOrgBuilder("""
|
|
Some text to be ignored for now
|
|
|
|
* Stars 1
|
|
|
|
Ignore me
|
|
|
|
** Stars 1-1
|
|
|
|
*** Stars 1-1-1
|
|
|
|
** Stars 1-2
|
|
|
|
* Stars 2
|
|
|
|
""")
|
|
.flatMap((builder: OrgBuilder) => tryParseBuild(
|
|
builder = builder,
|
|
builderFns = orgStyledTextBuilders,
|
|
defaultBuilderFn = makeRawTokenOrEmpty,
|
|
)
|
|
|
|
|
|
echo test
|