Skip to main content

Module walk

Module walk 

Source
Expand description

Port of src/ast/walk.ts: iterators of Arena::walk and Arena::walk_values.

The walkers do not borrow the arena: next() takes it. the children of the node returned by the last call are read by the next call, the caller may modify the node in between.

Structs§

NodeWalker
iterator of Arena::walk: node ids (and value tokens when attributes is set) in document order
ValueWalker
iterator of Arena::walk_values: token ids in document order
WalkerOptions
options of Arena::walk
WalkerValueOptions
options of Arena::walk_values

Enums§

WalkerValueResult
value returned by a value walker filter: an option or token ids to walk next
WalkerValueType
token type filter of WalkerValueOptions

Functions§

push_values
push the direct value tokens of a token onto a stack: the token list, then the fields of a structured token. pushed in order, then reversed in place (unless reverse) so that they are popped in order

Type Aliases§

WalkerFilter
filter of Arena::walk
WalkerOption
value returned by a walker filter: WalkerOption (a WalkerOptionEnum combination or nothing)
WalkerValueFilter
filter of Arena::walk_values