From b117d7b2b845fad5d5bb30a620a13b4810e7ffe3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Ga=C3=ABtan=20Cassiers?= Date: Sun, 10 Jan 2016 22:04:30 +0100 Subject: [PATCH] Document comment::*CodeCharKind --- src/comment.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/comment.rs b/src/comment.rs index 3f716d9039c..3382ab53276 100644 --- a/src/comment.rs +++ b/src/comment.rs @@ -238,17 +238,25 @@ enum CharClassesStatus { LineComment, } +/// Distinguish between functionnal part of code and comments #[derive(PartialEq, Eq, Debug, Clone, Copy)] pub enum CodeCharKind { Normal, Comment, } +/// Distinguish between functionnal part of code and comments, +/// describing opening and closing of comments for ease when chunking +/// code from tagged characters #[derive(PartialEq, Eq, Debug, Clone, Copy)] enum FullCodeCharKind { Normal, + /// The first character of a comment, there is only one for a comment (always '/') StartComment, + /// Any character inside a comment including the second character of comment + /// marks ("//", "/*") InComment, + /// Last character of a comment, '\n' for a line comment, '/' for a block comment. EndComment, } -- 2.44.0