mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
format the final comments in records
This commit is contained in:
parent
d93e63bbd0
commit
2000948765
4 changed files with 208 additions and 6 deletions
|
@ -392,6 +392,17 @@ pub enum CommentOrNewline<'a> {
|
|||
DocComment(&'a str),
|
||||
}
|
||||
|
||||
impl<'a> CommentOrNewline<'a> {
|
||||
pub fn is_comment(&self) -> bool {
|
||||
use CommentOrNewline::*;
|
||||
match self {
|
||||
Newline => false,
|
||||
LineComment(_) => true,
|
||||
DocComment(_) => true,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub enum Pattern<'a> {
|
||||
// Identifier
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue