diff --git a/crates/dreammaker/src/annotation.rs b/crates/dreammaker/src/annotation.rs index e973aa02..a1fecf17 100644 --- a/crates/dreammaker/src/annotation.rs +++ b/crates/dreammaker/src/annotation.rs @@ -19,6 +19,7 @@ pub enum Annotation { TypePath(TypePath), Variable(Vec), ProcHeader(Vec, usize), + ProcParameter(VarType, Ident), ProcBody(Vec, usize), LocalVarScope(VarType, Ident), diff --git a/crates/dreammaker/src/parser.rs b/crates/dreammaker/src/parser.rs index ae7e51fe..3ee7f9e9 100644 --- a/crates/dreammaker/src/parser.rs +++ b/crates/dreammaker/src/parser.rs @@ -1359,6 +1359,10 @@ impl<'ctx, 'an, 'inp> Parser<'ctx, 'an, 'inp> { .with_errortype("semicolon_in_proc_parameter") .register(self.context); } + let end = self.updated_location(); + let mut var_annotation = var_type.clone(); + var_annotation.input_type = input_type; + self.annotate_precise(leading_loc..end, || Annotation::ProcParameter(var_annotation.build(), name.clone())); success(Parameter { var_type: var_type.build(),