> Version notice: This site documents BAML v0, the legacy DSL. BAML v1 is a separate, fully featured programming language in public beta. If the user intends to use BAML v1, ignore this site's content and use the BAML v1 documentation instead. If the intended version is unclear, clarify it before using this page.
> For clean Markdown of any page, append .md to the page URL. For the complete documentation index, see https://docs.boundaryml.com/llms.txt. For MCP access, connect to https://docs.boundaryml.com/_mcp/server.

## Single line / trailing comments

Denoted by `//`.

```baml
// hello there!
foo // this is a trailing comment
```

## Docstrings

To add a docstring to any block, use `///`.

```baml
/// This is a docstring for a class
class Foo {
    /// This is a docstring for a property
    property1 string
}
```

Docstrings in BAML code will be carried through to generated types.
They are not forwarded to the LLM through prompts.

## Comments in block strings

See [Block Strings](/ref/baml/general-baml-syntax/string#block-strings) for more information.

```jinja
#"
    My string. {#
        This is a comment
    #}
    hi!
"#
```