Nested arrays result in "expected (Ident) got Open Square"
merlindru opened this issue · 2 comments
merlindru commented
This might be a little tough to solve/the generated code could change a lot if an infinite amount of nesting is allowed.
The TypeScript version of bebop-tools compiles byte[][][]
in my .bop to Array<Array<Uint8Array>>
.
And thank you for maintaining this lib!! 😄
200sc commented
@merlindru Thanks for the report!
It's obviously a lot worse for readability but I've written a short test demonstrating that the other way of formatting arrays, array[subtype]
does support nesting, e.g. array[array[array[byte]]] bytes;
; this could be used as a workaround for now, although it should be a fairly quick thing to fix.
200sc commented
Correction; that will enable parsing to succeed but there's a code generation bug that needs to be addressed yet.