//////////////////////////////////////////////////////////////////////////////
// Copyright (c) 2023, 2026 Contributors to the Eclipse Foundation
//
// See the NOTICE file(s) distributed with this work for additional
// information regarding copyright ownership.
//
// This program and the accompanying materials are made available
// under the terms of the MIT License which is available at
// https://opensource.org/licenses/MIT
//
// SPDX-License-Identifier: MIT
//////////////////////////////////////////////////////////////////////////////

include::../_part_attributes.asciidoc[]

:leveloffset: -2

[[lang-ref-annotations-documentation]]
== Documentation annotations

Documentation <<lang-ref-annotations,annotations>> can be used to add documentation to CIF elements.
For basic information on documentation annotations, see the <<lang-tut-annotations-documentation,language tutorial>>.
Here we discuss further details.

=== Constraints

Documentation annotations (`@doc`) can be added to all elements of CIF specifications that support annotations.

The annotation has the following constraints, in addition to the <<lang-ref-annotations-constraints,general constraints>> that apply to all annotations:

* The annotation must have at least one argument.
* All arguments must be unnamed arguments.
* All arguments must have a `string`-typed value.
* It must be possible for the argument values to be statically evaluated.
* Evaluation of the argument values must not result in an evaluation error.
* If multiple arguments are given, each argument becomes a separate line of text in the order that they are given.
