# parseTilingTree
Source: https://docs.maelstrom-ai.co/dev/reference/client/functions/parsetilingtree/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

> **parseTilingTree**(`nodes`): [`TilingTreeNode`](https://docs.maelstrom-ai.co/dev/reference/client/type-aliases/tilingtreenode/) | `null`

Defined in: [packages/client/src/lib/chart-manager/tiling.ts:150](https://github.com/maelstrom-co/maelstrom/blob/89a8f5e9d10cedcf0b30376d7846113f06f26120/packages/client/src/lib/chart-manager/tiling.ts#L150)

Builds a tree from the flat preorder token array.

Each split token consumes exactly as many following subtrees as its weights declare — two for a bare `H` / `V`. Malformed input is reported on the console and rendered as far as it goes: an unfilled child slot stays `undefined`, and tokens trailing the first complete root are ignored. Returns `null` for empty input.

## Parameters

### nodes

readonly `TilingNode`\[\]

## Returns

[`TilingTreeNode`](https://docs.maelstrom-ai.co/dev/reference/client/type-aliases/tilingtreenode/) | `null`
