At the moment, the RootSignatureParser will early exit when it encounters it's first error. To be more in line with Clang error parsing, and to hopefully reduce the number of compile cycles for users, we can modify the parser to continue looking for parsing errors even after we encounter the first one.
We will do this at the granularity of a RootElement. To do so we will add a new interface onto RootSignatureParser, namely, skipUntilExpectedToken. This will be used to consume all the intermediate tokens between when an error has occured and when the next RootElement begins.
At this granularity, the implementation is quite straight forward, as we can just implement this skip function when we return from a parse[RootElement] method and continue in the main parse loop. Then continue the loop.
If we want to provide any finer granularity, then the skip logic becomes significantly more complicated. Skipping to the next root element will provide a good ratio of user experience benefit to complexity of implementation.
AC:
At the moment, the
RootSignatureParserwill early exit when it encounters it's first error. To be more in line with Clang error parsing, and to hopefully reduce the number of compile cycles for users, we can modify the parser to continue looking for parsing errors even after we encounter the first one.We will do this at the granularity of a
RootElement. To do so we will add a new interface ontoRootSignatureParser, namely,skipUntilExpectedToken. This will be used to consume all the intermediate tokens between when an error has occured and when the nextRootElementbegins.At this granularity, the implementation is quite straight forward, as we can just implement this
skipfunction when we return from aparse[RootElement]method and continue in the mainparseloop. Then continue the loop.If we want to provide any finer granularity, then the skip logic becomes significantly more complicated. Skipping to the next root element will provide a good ratio of user experience benefit to complexity of implementation.
AC:
HLSLRootSignatureParserwith askipUntilExpectedTokeninterfaceparseloop to use the skip interface when an error is found on parsing a root element