It works for many langs by exploiting the sloc program not properly parsing multi-line comments. Thus the biggest program would be infinite nops.
As long as you can trigger a block comment you can add as much as you want, for example:
/**/-->/*
console.log('Hello World!');
console.log('You can add as much as you want');
--> */
No limit, since it needn't even fit on one (real) line, as even in languages with semantic newlines (and no alternative) you can just wrap every line in multiline comments.