| 1311 | if (scope) scopes.push(scope); |
| 1312 | } |
| 1313 | const close = (end: number): number => { |
| 1314 | if (scope) scope.end = end; |
| 1315 | if (router) router.end = end; |
| 1316 | if (addressless) { |
| 1317 | const { scope: route, tags, page } = addressless; |
| 1318 | route.end = end; |
| 1319 | if (routeTags.length > tags) { |
| 1320 | if (route.component || route.lazy) scopes.push({ ...route, pathless: true }); |
| 1321 | } else if (page) scopes.push({ ...route, index: true }); |
| 1322 | } |
| 1323 | return end; |
| 1324 | }; |
| 1325 | if (source.startsWith('/>', i)) return close(i + 2); |
| 1326 | i++; |
| 1327 | while (i < source.length) { |