about summary refs log tree commit diff
path: root/lang/zig/comments.zig
diff options
context:
space:
mode:
Diffstat (limited to 'lang/zig/comments.zig')
-rw-r--r--lang/zig/comments.zig11
1 files changed, 11 insertions, 0 deletions
diff --git a/lang/zig/comments.zig b/lang/zig/comments.zig
new file mode 100644
index 0000000..3d1c2e2
--- /dev/null
+++ b/lang/zig/comments.zig
@@ -0,0 +1,11 @@
+const expect = @import("std").testing.expect;
+
+test "comments" {
+    // Comments in Zig start with "//" and end at the next LF byte
+    // (end of line).  The below line is a comment, and won't be executed.
+
+    //expect(false);
+
+    const x = true;  // another comment
+    expect(x);
+}