mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +00:00
Parse user-specified Effect name
This commit is contained in:
parent
c8b28b96fa
commit
7ba95a0bd0
5 changed files with 49 additions and 29 deletions
|
@ -54,7 +54,7 @@ pub struct PlatformHeader<'a> {
|
|||
pub provides: Vec<'a, Loc<ExposesEntry<'a>>>,
|
||||
pub requires: Vec<'a, Loc<ExposesEntry<'a>>>,
|
||||
pub imports: Vec<'a, Loc<ImportsEntry<'a>>>,
|
||||
pub effects: Vec<'a, Loc<EffectsEntry<'a>>>,
|
||||
pub effects: Effects<'a>,
|
||||
|
||||
// Potential comments and newlines - these will typically all be empty.
|
||||
pub after_platform_keyword: &'a [CommentOrNewline<'a>],
|
||||
|
@ -64,8 +64,15 @@ pub struct PlatformHeader<'a> {
|
|||
pub after_requires: &'a [CommentOrNewline<'a>],
|
||||
pub before_imports: &'a [CommentOrNewline<'a>],
|
||||
pub after_imports: &'a [CommentOrNewline<'a>],
|
||||
pub before_effects: &'a [CommentOrNewline<'a>],
|
||||
pub after_effects: &'a [CommentOrNewline<'a>],
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct Effects<'a> {
|
||||
pub spaces_before_effects_keyword: &'a [CommentOrNewline<'a>],
|
||||
pub spaces_after_effects_keyword: &'a [CommentOrNewline<'a>],
|
||||
pub spaces_after_type_name: &'a [CommentOrNewline<'a>],
|
||||
pub type_name: &'a str,
|
||||
pub entries: Vec<'a, Loc<EffectsEntry<'a>>>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue