3 ms·
Even if you don't use KDL, you might enjoy seeing its use of "slashdash comments" -- this is a great idea to steal if you ever write your own language! [1]
by xpe 1y ago
Even if you don't use KDL, you might enjoy seeing its use of "slashdash comments" -- this is a great idea to steal if you ever write your own language! [1]
package
name my-pkg
version "1.2.3"
// ... rest of example at https://kdl.dev
// "Slashdash" comments operate at the node level,
// with just `/-`.
/-this-is-commented {
this entire node {
is gone
}
}
}
KDL v2 spec : slashdash comments:
https://github.com/kdl-org/kdl/blob/main/draft-marchan-kdl2.md#slashdash-comments https://github.com/kdl-org/kdl/blob/main/draft-marchan-kdl2....
[1] Other languages have it -- this first one that comes to mind is Clojure which allows commenting out of an expression with `#_` (a reader macro): https://clojure.org/reference/reader#_dispatch https://clojure.org/reference/reader#_dispatch