Skip to content

avoid a segfault when h_act_flatten() is called on a null token

Sven M. Hallberg requested to merge flatten-null into master

also includes commented-out tests for functionality that i discovered we never provided, namely position and length information at the granularity of HParsedTokens. i realize this is asking to commit dead code, but i left it in because the code was already written and i figured test code is better kept than scrapped.

fwiw: at the moment, the fields bit_length, index, and bit_offset in HParsedToken always seem to be 0. we should probably fix that or get rid of them... in the latter case it might make sense to move this information to HParseResult, so the user can get access to it via h_action() as needed.

Merge request reports