Search code examples
commentswebassembly

Multiple line comments in WebAssembly


Is there any way to write a several-lines comment in Wasm (wat)? I know that ;; is used for a one-line comment.


Solution

  • Yes there is, it is (; ;): These comments can also be nested.

    (;  
    my
    multi (; line ;)
    comment   
    ;)
    

    It is written in the specification Section 6.2.4 (Text Format - Lexical Format - Comments).