feat: doc comments on anonymous initialize
This commit is contained in:
parent
05e42b51b3
commit
323c94ef34
1 changed files with 2 additions and 2 deletions
|
|
@ -335,9 +335,9 @@ def elabMutual : CommandElab := fun stx => do
|
|||
`($[unsafe%$unsafe?]? def initFn : IO $type := with_decl_name% ?$id do $doSeq
|
||||
$[$doc?:docComment]? @[$attrId:ident initFn, $(attrs?.getD ∅),*] $(vis?)? opaque $id : $type)
|
||||
else
|
||||
let `(Parser.Command.declModifiersT| ) := declModifiers
|
||||
let `(Parser.Command.declModifiersT| $[$doc?:docComment]? ) := declModifiers
|
||||
| Macro.throwErrorAt declModifiers "invalid initialization command, unexpected modifiers"
|
||||
`(@[$attrId:ident] def initFn : IO Unit := do $doSeq)
|
||||
`($[$doc?:docComment]? @[$attrId:ident] def initFn : IO Unit := do $doSeq)
|
||||
| _ => Macro.throwUnsupported
|
||||
|
||||
builtin_initialize
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue