mirror of
https://github.com/roc-lang/roc.git
synced 2025-07-24 06:55:15 +00:00
More impls for to_node
This commit is contained in:
parent
dbbd097708
commit
3a7265baed
2 changed files with 22 additions and 0 deletions
|
@ -40,6 +40,16 @@ impl<'a, T: Copy> ExtractSpaces<'a> for Spaces<'a, T> {
|
|||
}
|
||||
}
|
||||
|
||||
impl<'a, T> Spaces<'a, T> {
|
||||
pub fn item(item: T) -> Self {
|
||||
Self {
|
||||
before: &[],
|
||||
item,
|
||||
after: &[],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
|
||||
pub struct SpacesBefore<'a, T> {
|
||||
pub before: &'a [CommentOrNewline<'a>],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue