YAML.jl icon indicating copy to clipboard operation
YAML.jl copied to clipboard

composer.input return values

Open kescobo opened this issue 3 years ago • 0 comments

From #116 @hexane360 said:

To be honest, the hacky part was already there, in that _parse_flow_sequence_entry could randomly return nothing. This change just handles that case appropriately. I'm not familiar enough with the codebase to know if randomly returning nothing is expected behavior for composer.input. I'd suggest adding an output type hint, but the way the code is structured makes it impossible to propagate that to the users of composer.input.

One alternative would be for _parse_flow_sequence_entry to ingest the ] token and produce a SequenceEndEvent. That might be more idiomatic.

kescobo avatar Jun 01 '21 14:06 kescobo