What is the syntax for comments in LIGO?
2 Answers
In PascaLIGO and CameLIGO, the block comments are anything (including UTF-8 encoded glyphs) between (*
and *)
. In ReasonLIGO, the delimiters are /*
and */
.
In all three LIGO syntaxes, line comments are introduced by //
.
Anything between //
and a new line \n
is considered a comment by the compiler. And anything between (*
and *)
is also a comment.
So
// This is a comment
const a: nat = 4n; // and this is a comment
(* and this is also a comment *)
-
You should give people the possibility to answer your questions and not always rush to answer them yourself.– FFFOct 28, 2020 at 1:43
-
If you think there is anything to add, you are free to provide another answer. Also: I did ask this question on Slack and got an answer from the LIGO compiler developers. That's how I learned about the
(**)
notation. I am trying to provide some information here on Stack Exchange which is unfortunately lacking because the community spends too much time on Slack. Oct 28, 2020 at 8:00 -
@FFF You should be telling the people hanging out on Slack that they should move their Q&As here. You are barking up the wrong tree. Oct 30, 2020 at 18:14