This is a slight change to the arg consumption tracking in
the native parser, so that unconsumed args are now reported
per positional context (i.e., global vs goal scope).
This is so we can wire this in to the existing handling of such
errors, which expects to know about the scoping so it can
choose which flags to consider for "did you mean" computation.
This change also moves the check for unconsumed args into a
central function, in preparation for the switch to native parsing.
This is a slight change to the arg consumption tracking in the native parser, so that unconsumed args are now reported per positional context (i.e., global vs goal scope).
This is so we can wire this in to the existing handling of such errors, which expects to know about the scoping so it can choose which flags to consider for "did you mean" computation.
This change also moves the check for unconsumed args into a central function, in preparation for the switch to native parsing.