WMS_MAIN/temp_find_missing_commas.js
2026-04-17 19:21:57 +08:00

1 line
518 B
JavaScript

const fs=require('fs');const s=fs.readFileSync('methods/system.json','utf8');const re=/}\s*\n\s*\{/g;let found=false;while(true){const m=re.exec(s);if(!m) break;const idx=m.index;let j=idx-1;while(j>=0&&/\s/.test(s[j])) j--;const prev=s[j]||'';if(prev!==','){found=true;const start=Math.max(0,idx-60);const end=Math.min(s.length, idx+60);console.log('---possible missing comma at',idx,'prevChar:',prev);console.log(s.slice(start,end));console.log('---');}}if(!found) console.log('No obvious }\n{ without comma found');