mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
parse a shortname prefix before Effects
This commit is contained in:
parent
44fd0351be
commit
53afa3c3fc
4 changed files with 12 additions and 1 deletions
|
@ -490,6 +490,11 @@ fn effects<'a>() -> impl Parser<'a, Effects<'a>> {
|
|||
let (spaces_before_effects_keyword, state) =
|
||||
skip_second!(space1(0), ascii_string("effects")).parse(arena, state)?;
|
||||
let (spaces_after_effects_keyword, state) = space1(0).parse(arena, state)?;
|
||||
|
||||
// e.g. `fx.`
|
||||
let (type_shortname, state) =
|
||||
skip_second!(lowercase_ident(), ascii_char(b'.')).parse(arena, state)?;
|
||||
|
||||
let ((type_name, spaces_after_type_name), state) =
|
||||
and!(uppercase_ident(), space1(0)).parse(arena, state)?;
|
||||
let (entries, state) = collection!(
|
||||
|
@ -506,6 +511,7 @@ fn effects<'a>() -> impl Parser<'a, Effects<'a>> {
|
|||
spaces_before_effects_keyword,
|
||||
spaces_after_effects_keyword,
|
||||
spaces_after_type_name,
|
||||
type_shortname,
|
||||
type_name,
|
||||
entries,
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue