Package lepl :: Package support :: Module node
[hide private]
[frames] | no frames]

Module node

source code

Base classes for AST nodes (and associated functions).
Classes [hide private]
  NodeException
Exception raised when we have problems dynamically creating nodes.
  Node
A base class for AST nodes.
  MutableNode
Extend Node to allow children to be set.
  NodeTreeStr
Extend GraphStr to handle named pairs - this generates an 'ASCII tree' representation of the node graph.
Functions [hide private]
 
is_named(arg)
Is this is "named tuple"?
source code
 
new_named_node(name, node)
Generate a sub-class of Node, with the given name as type, as long as it is not already a subclass.
source code
 
coerce(arg)
Convert named nodes to nodes with that name.
source code
 
node_throw(node)
Raise an error, if one exists in the results (AST trees are traversed).
source code
 
make_dict(contents)
Construct a dict from a list of named pairs (other values in the list will be discarded).
source code
 
join_with(separator='')
Join results together (via separator.join()) into a single string.
source code
Function Details [hide private]

node_throw(node)

source code 
Raise an error, if one exists in the results (AST trees are traversed). Otherwise, the results are returned (invoke with >>).

make_dict(contents)

source code 
Construct a dict from a list of named pairs (other values in the list will be discarded). Invoke with > after creating named pairs with > string.

join_with(separator='')

source code 

Join results together (via separator.join()) into a single string.

Invoke as > join_with(','), for example.