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
print("hello!")

print("the result is {5 + 5}") // This will print 10thp

Multi line

These begin with /* and end with */. Everything in between is ignored.

Multi line comments can be nested in THP.

/*
  This is a
  multiline comment
*/thp
/*
  Multiline comments
  can be /* nested */
*/thp

Documentation comments

Documentation comments use triple slashes ///. These use CommonMark Markdown syntax.

/// Transforms the format from A to B...
///
/// ## Errors
///
/// This function will error if condition
/// X or Y is met...
fun transform() {
  // ...
}thp