use oak_core::SyntaxKind;
use serde::{Deserialize, Serialize};
#[derive(Copy, Clone, Debug, PartialEq, Eq, Serialize, Deserialize)]
pub enum NoteSyntaxKind {
Text,
Whitespace,
Newline,
Heading1,
Heading2,
Heading3,
Heading4,
Heading5,
Heading6,
HeadingText,
Emphasis, Strong, Strikethrough,
InlineCode, CodeBlock, CodeFence, CodeLanguage,
Link,
LinkText,
LinkUrl,
LinkTitle,
Image,
ImageAlt,
ImageUrl,
ImageTitle,
UnorderedList,
OrderedList,
ListItem,
ListMarker, TaskList,
TaskMarker,
Blockquote,
BlockquoteMarker,
HorizontalRule,
Table,
TableRow,
TableCell,
TableHeader,
TableSeparator, TableAlignment,
HtmlTag,
HtmlComment,
Escape,
LeftBracket, RightBracket, LeftParen, RightParen, LeftAngle, RightAngle, Asterisk, Underscore, Backtick, Tilde, Hash, Pipe, Dash, Plus, Dot, Colon, Exclamation,
Error,
Document,
Paragraph,
Eof,
}
impl SyntaxKind for NoteSyntaxKind {
fn is_trivia(&self) -> bool {
matches!(self, Self::Whitespace | Self::Newline)
}
fn is_comment(&self) -> bool {
matches!(self, Self::HtmlComment)
}
fn is_whitespace(&self) -> bool {
matches!(self, Self::Whitespace | Self::Newline)
}
fn is_token_type(&self) -> bool {
!matches!(self, Self::Document | Self::Paragraph)
}
fn is_element_type(&self) -> bool {
matches!(self, Self::Document | Self::Paragraph)
}
}