Skip to main content

parse_annotation_def

Function parse_annotation_def 

Source
pub fn parse_annotation_def(pair: Pair<'_, Rule>) -> Result<AnnotationDef>
Expand description

Parse an annotation definition with lifecycle handlers

Grammar:

annotation_def = {
    "annotation" ~ ident ~ "(" ~ annotation_def_params? ~ ")" ~ "{" ~ annotation_body ~ "}"
}
annotation_body = { annotation_handler* }
annotation_handler = {
    annotation_handler_name ~ "(" ~ annotation_handler_params? ~ ")" ~ return_type? ~ block_expr
}