The value returned from ParseText is either a Parse Node or a non-empty List of SyntaxError objects, with the latter case never propagated directly (only two sites throw an exception, and neither specify it to come from the List). Instead, it is common for call sites to differentiate the two cases for either using the Parse Node or employing non-throwing fallback behavior. But the mechanism of differentiation is sometimes "parseResult is a [non-empty] List of {errors,SyntaxError objects}" and other times (although a bit less frequently) is "parseResult is [not] a Parse Node".
I'd like to establish a convention, and checking for a Parse Node is more intuitive to me, but I could live with checking for a List if that has more support.
The value returned from ParseText is either a Parse Node or a non-empty List of SyntaxError objects, with the latter case never propagated directly (only two sites throw an exception, and neither specify it to come from the List). Instead, it is common for call sites to differentiate the two cases for either using the Parse Node or employing non-throwing fallback behavior. But the mechanism of differentiation is sometimes "parseResult is a [non-empty] List of {errors,SyntaxError objects}" and other times (although a bit less frequently) is "parseResult is [not] a Parse Node".
I'd like to establish a convention, and checking for a Parse Node is more intuitive to me, but I could live with checking for a List if that has more support.