ast updated
This commit is contained in:
+33
-1
@@ -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 "";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user