Can't parse Bin syntax properly
It seems that this library only handles Bins that only contain a string, but there are other cases, as specified here: http://erlang.org/doc/programming_examples/bit_syntax.html
Specifically I wasn't able to parse this expression today: <<1,2,3,4,5,6,7,8>>.
Thanks for reporting this! please check this update https://github.com/machinezone/python_etf/commit/9337b6385d63b79513ed5411b81491bd12a7a3cf
the following test was added:
eq_(decode('<<>>.'), [('')])
eq_(decode('<<"ohai">>.'), [('ohai')])
eq_(decode('<<"ohai", "ohai">>.'), [('ohaiohai')])
eq_(decode('<<97, 98, 99>>.'), [('abc')])
Thanks, that does indeed cover my use case. However it doesn't quite cover all the different forms of bin syntax, as explained in the link I gave. Note the Size and TypeSpecifierList terms that are described there.
but we don't have variables and matching, only constants are allowed,
I'm not completely sure that 1:4/little-signed-integer-unit:8 would be useful