elm-ast 0.2.0

A syn-quality Rust library for parsing and constructing Elm 0.19.1 ASTs
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/// A comment in Elm source code.
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[derive(Clone, Debug, PartialEq, Eq, Hash)]
pub enum Comment {
    /// A single-line comment: `-- this is a comment`
    Line(String),

    /// A multi-line block comment: `{- this is a comment -}`
    /// These can be nested in Elm.
    Block(String),

    /// A documentation comment: `{-| This is a doc comment -}`
    Doc(String),
}