Fix too-shallow descs for "siblings"
parent
6e70709e67
commit
593d903a53
|
@ -732,11 +732,9 @@ runCmdParserAExt mTopLevel inputInitial cmdParser =
|
|||
Just $ (Just name, child, act, vis, InputArgs strr)
|
||||
(Nothing, _) -> Just $ (Nothing, child, act, vis, input)
|
||||
_ -> Nothing
|
||||
case mRest of
|
||||
Nothing -> do -- a child not matching what we have in the input
|
||||
combined_child_list `forM_` \(child_name, (vis, child, _)) -> do
|
||||
let initialDesc :: CommandDesc out = emptyCommandDesc
|
||||
-- get the shallow desc for the child in a separate env.
|
||||
combined_child_list `forM_` \(child_name, (vis, child, _)) -> do
|
||||
let (subCmd, subStack) =
|
||||
runIdentity
|
||||
$ MultiRWSS.runMultiRWSTNil
|
||||
|
@ -747,13 +745,18 @@ runCmdParserAExt mTopLevel inputInitial cmdParser =
|
|||
( child_name
|
||||
, postProcessCmd subStack subCmd { _cmd_visibility = vis }
|
||||
)
|
||||
case mRest of
|
||||
Nothing -> do -- a child not matching what we have in the input
|
||||
-- get the shallow desc for the child in a separate env.
|
||||
-- proceed regularly on the same layer
|
||||
processMain $ restCmdParser
|
||||
Just (name, vis, child, act, rest) -> do -- matching child -> descend
|
||||
-- process all remaining stuff on the same layer shallowly,
|
||||
-- including the current node. This will be replaced later.
|
||||
-- including the current node. This will walk over the child
|
||||
-- definition(s) again, but that is harmless because we do not
|
||||
-- overwrite them.
|
||||
iterM processCmdShallow f
|
||||
-- so the descend
|
||||
-- do the descend
|
||||
cmd <- do
|
||||
c :: CommandDesc out <- mGet
|
||||
prevStack :: CmdDescStack <- mGet
|
||||
|
|
Loading…
Reference in New Issue