in freemarker-docgen-core/src/main/java/org/freemarker/docgen/core/CJSONInterpreter.java [1409:1451]
private char skipWS() throws EvaluationException {
char c;
skipWSFoundNL = false;
while (p < ln) {
c = tx.charAt(p);
if (!isWS(c)) {
if (c == '/' && p + 1 < ln && tx.charAt(p + 1) == '/') {
while (true) {
p++;
if (p == ln) {
return 0x20; //!
}
c = tx.charAt(p);
if (c == 0xA || c == 0xD) {
skipWSFoundNL = true;
break; //!
}
}
} else if (c == '/' && p + 1 < ln && tx.charAt(p + 1) == '*') {
int commentP = p;
p++;
while (true) {
p++;
if (p + 1 >= ln) {
throw newSyntaxError(
"Comment was not closed with \"*/\".",
commentP);
}
if (tx.charAt(p) == '*' && tx.charAt(p + 1) == '/') {
p++;
break; //!
}
}
} else {
return c; //!
}
} else if (c == 0xD || c == 0xA) {
skipWSFoundNL = true;
}
p++;
}
return 0x20;
}