MCPcopy Create free account
hub / github.com/dabeaz/python-cookbook / example.py

File example.py

src/8/implementing_the_visitor_pattern/example.py:None–None  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1# Example of the visitor pattern
2
3# --- The following classes represent nodes in an expression tree
4class Node:

Callers

nothing calls this directly

Calls 9

StackCodeClass · 0.85
generate_codeMethod · 0.80
SubClass · 0.70
NumberClass · 0.70
MulClass · 0.70
DivClass · 0.70
AddClass · 0.70
EvaluatorClass · 0.70
visitMethod · 0.45

Tested by

no test coverage detected