]> git.lizzy.rs Git - rust.git/commitdiff
Document comment::*CodeCharKind
authorGaëtan Cassiers <gaetan.cassiers@gmail.com>
Sun, 10 Jan 2016 21:04:30 +0000 (22:04 +0100)
committerGaëtan Cassiers <gaetan.cassiers@gmail.com>
Sun, 10 Jan 2016 21:04:30 +0000 (22:04 +0100)
src/comment.rs

index 3f716d9039ca0ac31861d4de7ff1d025c5d6fa48..3382ab53276cc1599ea0f22ebc0c96bc42a5c375 100644 (file)
@@ -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,
 }