()
| 35 | const errors = []; |
| 36 | |
| 37 | function executableLines() { |
| 38 | return text |
| 39 | .split('\n') |
| 40 | .map((line) => line.trim()) |
| 41 | .filter((line) => { |
| 42 | if (line.length === 0) return false; |
| 43 | if (line.startsWith('*') || line.startsWith('//') || line.startsWith('/*')) return false; |
| 44 | return true; |
| 45 | }); |
| 46 | } |
| 47 | |
| 48 | for (const line of executableLines()) { |
| 49 | for (const match of line.matchAll(/\brequire\(\s*["']([^"']+)["']\s*\)/g)) { |