first commit
CI / lint (push) Failing after 49s
CI / format (push) Failing after 1m6s
CI / typecheck (push) Successful in 1m8s
CI / test (push) Failing after 1m8s

This commit is contained in:
SDI committed 2026-07-15 18:05:12 +09:00
commit 12e4f17b62
4633 files changed
+817125

No files matched your search

@@ -0,0 +1,18 @@
export function commentParser(text) {
text = text.trim();
if (text.substr(0, 2) === '//') {
return [
'line',
text.split(/\r?\n/).map(function (line) {
return line.substr(2);
}),
];
} else if (text.substr(0, 2) === '/*' && text.substr(-2) === '*/') {
return ['block', text.substring(2, text.length - 2)];
} else {
throw new Error(
'Could not parse comment file: the file must contain either just line comments (//) or a single block comment (/* ... */)',
);
}
}