Documentation comments start with /** and end with */. They are formatted using the Markdown syntax.
/** * This is a doc comment. * * It can be used to document **Ara** code. * * ## Example * * ```ara * $result = add(1, 2); * ``` */function add(int $a, int $b): int { $a + $b}
Fundamentals: Comments #
Ara supports three types of comments:
//
and continue until the end of the line./*
and end with*/
./**
and end with*/
.Single-line comments #
Single-line comments start with
//
and continue until the end of the line is reached.Multi-line comments #
Multi-line comments (AKA block comments) start with
/*
and end with*/
.Documentation comments #
Documentation comments start with
/**
and end with*/
. They are formatted using theMarkdown
syntax.Special comments #
Ara supports special comments, which are used to control the behavior of Ara code.
@ignore(...)
#The
@ignore
comment can be used to ignore linting errors.Example #