doc: Syntax.topDown

This commit is contained in:
Sebastian Ullrich 2021-03-11 18:42:36 +01:00 committed by Leonardo de Moura
parent ddff87f7f5
commit cb5050bb7f

View file

@ -180,6 +180,10 @@ structure TopDown where
firstChoiceOnly : Bool
stx : Syntax
/--
`for _ in stx.topDown` iterates through each node and leaf in `stx` top-down, left-to-right.
If `firstChoiceOnly` is `true`, only visit the first argument of each choice node.
-/
def topDown (stx : Syntax) (firstChoiceOnly := false) : TopDown := ⟨firstChoiceOnly, stx⟩
partial instance : ForIn m TopDown Syntax where