You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: content/documentation/basic-types.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -140,8 +140,20 @@ A set is a sequence of whitespace-separated values prefixed by the function `set
140
140
141
141
## Comments
142
142
143
-
A comment begins with a `#` character and continues until the end of the line. There are no multi-line comments.
143
+
A comment begins with a `#`or `;`character and continues until the end of the line. There are no multi-line comments.
144
144
145
145
```phel
146
146
# This is a comment
147
+
; This is also a comment
147
148
```
149
+
150
+
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.
151
+
152
+
```
153
+
[:one :two :three] # results to [:one :two :three]
154
+
[#_:one :two :three] # results to [:two :three]
155
+
[#_:one :two #_:three] # results to [:two]
156
+
[#_#_:one :two :three] # results to [:three]
157
+
```
158
+
159
+
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.
0 commit comments