Comments
In order to improve maintainability, Gate supports comments, similar to solidity, Rust, JS, etc.
Single line comments
Every character after // in a line would be ignored.
// This source is a constant number
source x: integer = 3; // Also works hereMulti line comments
Anything after /* would be ignored until a matching */
/* THIS IS A COMMENT
The reason we are
doing this calculation is
because we want to ensure
math is correct
*/
source isMathCorrect: boolean = (4 > 3); /* Also works like that */
Last updated