Skip to main content
Version: 1.4.0


JsLIGO features multi-line comments like JavaScript, but additionally accepts their nesting:
/* This is a multi-line comment
/* and one "nested" */*/

The contents of comments are scanned, and therefore strings and comments in comments, like "nested" and /* and one "nested" */, need to be valid (properly closed). This enables commenting out a random piece of contract that may already contain comments. The downside is that you can only comment code or text whose strings and comments are valid.

LIGO also offers single line comments à la JavaScript:

const x = 10; // This is a single line comment

Comments can contain UTF-8 glyphs. Given that the generated Michelson does not contain comments, UTF-8 may matter for documentation of the source, and error messages display line offsets in the source as numbers of such glyphs, not bytes.