Skip to main content

elm_ast/
comment.rs

1/// A comment in Elm source code.
2#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
3#[derive(Clone, Debug, PartialEq, Eq, Hash)]
4pub enum Comment {
5    /// A single-line comment: `-- this is a comment`
6    Line(String),
7
8    /// A multi-line block comment: `{- this is a comment -}`
9    /// These can be nested in Elm.
10    Block(String),
11
12    /// A documentation comment: `{-| This is a doc comment -}`
13    Doc(String),
14}