031 nested tree

✓ Passing This code compiles and runs correctly.

Code

input.k

Actual

value(7) depth=1 leaf=7
value(array(value(7))) depth=3 leaf=7
value(array(value(array(value(7))))) depth=5 leaf=7

Expected output

value(7) depth=1 leaf=7
value(array(value(7))) depth=3 leaf=7
value(array(value(array(value(7))))) depth=5 leaf=7

Flows

flow ~grammar click a branch to expand · @labels scroll to their anchor
grammar (expr: nums)
flow ~parse click a branch to expand · @labels scroll to their anchor
parse (expr: "7", grammar: nums)
flow ~parse click a branch to expand · @labels scroll to their anchor
parse (expr: "[7]", grammar: nums)
flow ~parse click a branch to expand · @labels scroll to their anchor
parse (expr: "[[7]]", grammar: nums)

Test Configuration

MUST_RUN