ast updated

This commit is contained in:
2026-05-17 16:30:49 +03:00
parent 208d34864e
commit 24750ddcbe
20 changed files with 194 additions and 38 deletions
+33 -1
View File
@@ -1,5 +1,8 @@
#pragma once
#include <unordered_map>
#include <string>
enum class NodeKind {
CodeBlock,
Header,
@@ -12,4 +15,33 @@ enum class NodeKind {
Italic,
Link,
Text
};
};
const std::string toString(NodeKind kind) {
switch (kind) {
case NodeKind::CodeBlock:
return "CodeBlock";
case NodeKind::Header:
return "Header";
case NodeKind::List:
return "List";
case NodeKind::ListItem:
return "ListItem";
case NodeKind::Paragraph:
return "Paragraph";
case NodeKind::Bold:
return "Bold";
case NodeKind::InlineCode:
return "InlineCode";
case NodeKind::Italic:
return "Italic";
case NodeKind::Link:
return "Link";
case NodeKind::Text:
return "Text";
default:
return "";
}
}