parser.h 726 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #ifndef CMARK_AST_H
  2. #define CMARK_AST_H
  3. #include <stdio.h>
  4. #include "references.h"
  5. #include "node.h"
  6. #include "buffer.h"
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. #define MAX_LINK_LABEL_LENGTH 1000
  11. struct cmark_parser {
  12. struct cmark_mem *mem;
  13. struct cmark_reference_map *refmap;
  14. struct cmark_node *root;
  15. struct cmark_node *current;
  16. int line_number;
  17. bufsize_t offset;
  18. bufsize_t column;
  19. bufsize_t first_nonspace;
  20. bufsize_t first_nonspace_column;
  21. bufsize_t thematic_break_kill_pos;
  22. int indent;
  23. bool blank;
  24. bool partially_consumed_tab;
  25. cmark_strbuf curline;
  26. bufsize_t last_line_length;
  27. cmark_strbuf linebuf;
  28. int options;
  29. bool last_buffer_ended_with_cr;
  30. };
  31. #ifdef __cplusplus
  32. }
  33. #endif
  34. #endif