fn parse_annotations(&mut self, annotations: &mut Annotations) -> WeldResult<()> {
        if *self.peek() == TAtMark {
            self.consume(TAtMark)?;
            self.consume(TOpenParen)?;
            while *self.peek() != TCloseParen {
                let key = self.symbol()?;
                self.consume(TColon)?;
                let value = match *self.peek() {
                    TI32Literal(ref v) => v.to_string(),
                    TI64Literal(ref v) => v.to_string(),
                    TF32Literal(ref v) => v.to_string(),
                    TF64Literal(ref v) => v.to_string(),
                    TI16Literal(ref v) => v.to_string(),
                    TI8Literal(ref v) => v.to_string(),
                    TBoolLiteral(ref v) => v.to_string(),
                    TStringLiteral(ref v) => v.clone(),
                    TIdent(ref v) => v.clone(),
                    _ => {
                        return compile_err!(
                            "Annotation value must be a literal or identifier/string"
                        );
                    }
                };

                // Consume whatever we saw.
                let token = self.peek().clone();
                self.consume(token)?;

                annotations.set(key.to_string(), value);

                if *self.peek() == TComma {
                    self.consume(TComma)?;
                } else if *self.peek() != TCloseParen {
                    return compile_err!("Expected ',' or ')'");
                }
            }
            self.consume(TCloseParen)?;
        }
        Ok(())
    }
Parses annotations in the format "@(<annotation name>: <annotation value>,...)".
weld/src/syntax/parser.rs