implement locals state logic
add basic node pretty-printing
initial pattern-matching implementation

also, when an expansion rule is not found for a node or pattern, an exception
is raised, as it cannot possibly continue