elliptic.Kernel.Expression module¶
-
class
elliptic.Kernel.Expression.EllipticNode[source]¶ Bases:
anytree.node.nodemixin.NodeMixinBase class for representing a node in the DSL tree.
-
class
elliptic.Kernel.Expression.Expression(context_delegate, display_name='', display_args=None)[source]¶ Bases:
elliptic.Kernel.Expression.EllipticNodeBase class for building DSL expressions.
- Parameters
context_delegate (
Type[ContextDelegate]) – A context delegate object responsible for generating some Cython code.display_name – The name that will be displayed when this Expression is rendered into a picture.
display_args – The arguments that will be displayed below this Expression name in the rendered picture.
-
render(template_manager, child, context_delegate)[source]¶ Render the expression generated code.
- Parameters
template_manager – A TemplateManagerBase instance.
child (
str) – The rendered template corresponding to this node’s child.context_delegate (
ContextDelegate) – The context delegate for the DSL.
- Return type
-
visit(context)[source]¶ Context manager used when an expression node is visited in the DSL tree.
Calls the
context delegatecontext_enter()andcontext_exit()methods.- Parameters
context (
Context) – A context object.- Return type