Feat: ability to handle inline comment

This commit is contained in:
SukkaW
2025-08-17 17:35:02 +08:00
parent fe7278c7fa
commit 373f862c6d
7 changed files with 22 additions and 10 deletions

View File

@@ -63,6 +63,7 @@ function processFile(span: Span, sourcePath: string) {
let sgmodulePathname: string | null = null;
try {
let l: string | null = '';
for await (const line of readFileByLine(sourcePath)) {
if (line.startsWith(MAGIC_COMMAND_SKIP)) {
return $skip;
@@ -83,7 +84,7 @@ function processFile(span: Span, sourcePath: string) {
continue;
}
const l = processLine(line);
l = processLine(line);
if (l) {
lines.push(l);
}