mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-04 04:08:19 +00:00
Add module with optional param syntax test
This commit is contained in:
parent
370013b960
commit
08825a9e90
4 changed files with 34 additions and 0 deletions
|
@ -0,0 +1 @@
|
|||
module { x, y ? 0 } -> [menu]
|
|
@ -0,0 +1,31 @@
|
|||
Module {
|
||||
comments: [],
|
||||
header: Module(
|
||||
ModuleHeader {
|
||||
after_keyword: [],
|
||||
params: Some(
|
||||
ModuleParams {
|
||||
params: [
|
||||
@9-10 Identifier {
|
||||
ident: "x",
|
||||
},
|
||||
@12-18 OptionalField(
|
||||
"y",
|
||||
@17-18 Num(
|
||||
"0",
|
||||
),
|
||||
),
|
||||
],
|
||||
before_arrow: [],
|
||||
after_arrow: [],
|
||||
},
|
||||
),
|
||||
exposes: [
|
||||
@25-29 ExposedName(
|
||||
"menu",
|
||||
),
|
||||
],
|
||||
interface_imports: None,
|
||||
},
|
||||
),
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
module { x, y ? 0 } -> [menu]
|
|
@ -355,6 +355,7 @@ mod test_snapshots {
|
|||
pass/module_with_newline.header,
|
||||
pass/module_with_params.header,
|
||||
pass/module_with_params_and_multiline_exposes.header,
|
||||
pass/module_with_optional_param.header,
|
||||
pass/module_with_multiline_params_and_exposes.header,
|
||||
pass/multi_backpassing.expr,
|
||||
pass/multi_backpassing_in_def.moduledefs,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue