This improves memory usage and performance. The idea is exactly the same though. But instead of using `push()` and `pop()` we just build up 2 objects where we can track the number and parent individually based on the `depth`. This means that we only allocate 2 objects (which we change over time) we then simply use `parents[depth]` and `offsets[depth]` to get the necessary data out. Additionally, we're only storing the index/offset and the parent now. Since the incoming ast is `T[]`, it means that we don't really have a parent. For this we can create a fake parent (which is never passed to `enter(…)`, `exit(…)` or used by `path()`) |
||
|---|---|---|
| .. | ||
| @tailwindcss-browser | ||
| @tailwindcss-cli | ||
| @tailwindcss-node | ||
| @tailwindcss-postcss | ||
| @tailwindcss-standalone | ||
| @tailwindcss-upgrade | ||
| @tailwindcss-vite | ||
| internal-example-plugin | ||
| tailwindcss | ||
| tsconfig.base.json | ||