2025-05-24

Norg parser rewrite

Seems like I have to focus on developing rust parser from scratch. Discord Message

Parsing paragraphs

Because I don't want parser to do backtracing, it should parse multiple blocks at once.

parse_flat_block is kinda recursive (because it should call itself again to find next block) but if I make it recursive, the memory usage will be quite high for this case:

- asdf
  asdf
- asdf
  asdf
- @code
  asdf
  asdf
  @end

First block cannot be finished because it calls parsing second block ...recursively

So I have to peek if next is non-paragraph, and cache that result (don't try to parse full next flat block)