Remove DOC_COMMENT

Closes #166
This commit is contained in:
Jeremy A. Kolb 2018-10-31 17:38:18 -04:00
parent 2b210d98b8
commit 61580f3cb8
5 changed files with 3 additions and 6 deletions

View File

@ -81,7 +81,7 @@ pub fn highlight(file: &File) -> Vec<HighlightedRange> {
let mut res = Vec::new();
for node in file.syntax().descendants() {
let tag = match node.kind() {
COMMENT | DOC_COMMENT => "comment",
COMMENT => "comment",
STRING | RAW_STRING | RAW_BYTE_STRING | BYTE_STRING => "string",
ATTR => "attribute",
NAME_REF => "text",

View File

@ -113,7 +113,6 @@ Grammar(
"BYTE_STRING",
"RAW_BYTE_STRING",
"COMMENT",
"DOC_COMMENT",
"SHEBANG",
],
nodes: [

View File

@ -48,7 +48,7 @@ fn reparse_leaf<'node>(
) -> Option<(SyntaxNodeRef<'node>, GreenNode, Vec<SyntaxError>)> {
let node = algo::find_covering_node(node, edit.delete);
match node.kind() {
WHITESPACE | COMMENT | DOC_COMMENT | IDENT | STRING | RAW_STRING => {
WHITESPACE | COMMENT | IDENT | STRING | RAW_STRING => {
let text = get_text_after_edit(node, &edit);
let tokens = tokenize(&text);
let token = match tokens[..] {

View File

@ -116,7 +116,6 @@ pub enum SyntaxKind {
BYTE_STRING,
RAW_BYTE_STRING,
COMMENT,
DOC_COMMENT,
SHEBANG,
ROOT,
STRUCT_DEF,
@ -378,7 +377,6 @@ impl SyntaxKind {
BYTE_STRING => &SyntaxInfo { name: "BYTE_STRING" },
RAW_BYTE_STRING => &SyntaxInfo { name: "RAW_BYTE_STRING" },
COMMENT => &SyntaxInfo { name: "COMMENT" },
DOC_COMMENT => &SyntaxInfo { name: "DOC_COMMENT" },
SHEBANG => &SyntaxInfo { name: "SHEBANG" },
ROOT => &SyntaxInfo { name: "ROOT" },
STRUCT_DEF => &SyntaxInfo { name: "STRUCT_DEF" },

View File

@ -19,7 +19,7 @@ pub(crate) struct SyntaxInfo {
impl SyntaxKind {
pub fn is_trivia(self) -> bool {
match self {
WHITESPACE | COMMENT | DOC_COMMENT => true,
WHITESPACE | COMMENT => true,
_ => false,
}
}