Actions
CLASS
Config::BINDish::Actions - default actions for Config::BINDish::Grammar
DESCRIPTION
This class is the default to be used for parsing configs. It builds Config::BINDish::AST tree representation of a config data which is then provided to application code via Config::BINDish attribute $.top. The tree can be used to fetch required configuration data, see Config::BINDish::AST.
METHODS
Most of the methods correspond to named rules in Config::BINDish::Grammar. In this section only utility methods are documented.
make-container(Config::BINDish::Grammar::Value:D $val)
Method creates a new instance of Config::BINDish::AST::Value from its grammar counterpart.
enter-parent(Config::BINDish::AST::Node:D $inner -- Config::BINDish::AST::Node:D)>
enter-parent(Config::BINDish::AST::Node:U $inner, |profile -- Config::BINDish::AST::Node:D)>
Method is invoked when a new Config::BINDish::AST::Node is to be created. For example, this class uses it when creates the TOP node and each time a new block node is created. Config::BINDish::Expandable also uses this method for another kinds of nodes.
If $inner is an undefined typeobject then the method first creates an instance of it using method new and using profile as its arguments:
$inner.new(|profile)Method sets $*CFG-INNER-PARENT.
inner-parent()
Returns the innermost parent node.
SEE ALSO
COPYRIGHT
(c) 2023, Vadim Belman [email protected]
LICENSE
Artistic License 2.0
See the LICENSE file in this distribution.