Comments
THP supports single and multi line comments:
Single line
Begin with double slash //
and continue until the end of the line.
// This is a single line comment
╰╴No statement matched
print("hello!")
print("the result is {5 + 5}") // This will print 10
thp
Documentation comments
Documentation comments use triple slashes ///
.
These use CommonMark Markdown syntax.
/// Transforms the format from A to B...
╰╴No statement matched
///
/// ## Errors
///
/// This function will error if condition
/// X or Y is met...
fun transform() {
// ...
}
thp