forth: \, POSTPONE-imm split, >NUMBER, DOES> — Hayes 486→618 (97%)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Has been cancelled
This commit is contained in:
@@ -27,12 +27,16 @@ cd "$ROOT"
|
||||
awk '
|
||||
{
|
||||
line = $0
|
||||
# protect POSTPONE \ so the comment-strip below leaves the literal \ alone
|
||||
gsub(/POSTPONE[ \t]+\\/, "POSTPONE @@BS@@", line)
|
||||
# strip leading/embedded \ line comments (must be \ followed by space or EOL)
|
||||
gsub(/(^|[ \t])\\([ \t].*|$)/, " ", line)
|
||||
# strip ( ... ) block comments that sit on one line
|
||||
gsub(/\([^)]*\)/, " ", line)
|
||||
# strip TESTING … metadata lines (rest of line, incl. bare TESTING)
|
||||
sub(/TESTING([ \t].*)?$/, " ", line)
|
||||
# restore the protected backslash
|
||||
gsub(/@@BS@@/, "\\", line)
|
||||
print line
|
||||
}' "$SOURCE" > "$PREPROC"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user