Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion content/documentation/basic-types.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,20 @@ A set is a sequence of whitespace-separated values prefixed by the function `set

## Comments

A comment begins with a `#` character and continues until the end of the line. There are no multi-line comments.
A comment begins with a `#` or `;` character and continues until the end of the line. There are no multi-line comments.

```phel
# This is a comment
; This is also a comment
```

Phel also supports inline s-expression commenting with `#_` which comments out the next form. It can also be stacked to comment out two or more forms after it.

```
[:one :two :three] # results to [:one :two :three]
[#_:one :two :three] # results to [:two :three]
[#_:one :two #_:three] # results to [:two]
[#_#_:one :two :three] # results to [:three]
```

See also the [comment](/documentation/api/#comment) macro which ignores the forms inside and returns `nil` while still requiring the content to be valid Phel code.
Loading