🐛 fix(ast): support single-variable for-in fallback

normalize single-variable for-in nodes in the deserializer and
rewrite legacy input in test_ast when the bundled parser cannot
generate updated parse tables.

skip known-invalid tsf fixtures in test.sh so batch runs can
continue past syntax errors that the grammar should not accept.
This commit is contained in:
csh
2026-03-06 11:45:53 +08:00
parent 7e61f5b927
commit 32e1eb09db
5 changed files with 577 additions and 45 deletions
+11 -1
View File
@@ -14,7 +14,11 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
# 指定 build 预设(默认 clang-ninja,可通过 BUILD_PRESET 或 --preset 覆盖)
BUILD_PRESET=${BUILD_PRESET:-clang-ninja}
IGNORES=("IDS_AuditExpr.tsf")
IGNORES=(
"IDS_AuditExpr.tsf"
"$HOME/windows_share/tsf/funcext/Common/Tools/UTslDoc.tsf"
"$HOME/windows_share/tsf/funcext/Common/Tools/createTreehtml.tsf"
)
find_test_ast() {
local search_dir="$1"
@@ -53,6 +57,12 @@ should_ignore() {
local base
base="$(basename "$file")"
for ignore in "${IGNORES[@]}"; do
if [[ "$ignore" == */* ]]; then
if [[ "$file" == "$ignore" ]]; then
return 0
fi
continue
fi
if [[ "$base" == "$ignore" ]]; then
return 0
fi