org v0.1.0 Org.Lexer
Splits an org-document into tokens.
For many simple tasks, using the lexer is enough, and a full-fledged Org.Document
is not needed.
Usage example:
iex> source = "#+TITLE: Greetings\n\n* Hello\n** World\n** Universe\n* Goodbye\n"
iex> Org.Lexer.lex(source)
[{:comment, "+TITLE: Greetings"},
{:empty_line},
{:section_title, 1, "Hello"},
{:section_title, 2, "World"},
{:section_title, 2, "Universe"},
{:section_title, 1, "Goodbye"},
{:empty_line}]