@jetjs/core
class DefaultWalker
Walker to traverse the Plugin Definition AST defined by the PluginDefinition Type in Types.ts
This class is used to decouple the traversing strategy from the AST, so the AST is only a data structure without any methods. If there is need for another traversing strategy, wen can implement another Walker.
The Walker is part of the Visitor Pattern.
Methods
Method | Return | Description |
---|---|---|
walk(ast, visitor) | void | |
walkPluginDefinition(pd, visitor) | void |
Method Details
-
walk(ast, visitor) Method
Signature:walk<P extends Plugin, PG extends PluginGroup>(ast: PluginDefinitions, visitor: Visitor<P, PG>): void;
Returns:void
Parameter Type Description ast PluginDefinitions
visitor Visitor
-
walkPluginDefinition(pd, visitor) Method
Signature:walkPluginDefinition<P extends Plugin, PG extends PluginGroup>(pd: PluginDefinition<P, PG>, visitor: Visitor<P, PG>): void;
Returns:void
Parameter Type Description pd PluginDefinition
visitor Visitor