Use the visitor design pattern to create another example of a visitor class, say ASTCounter, which counts

Question:

Use the visitor design pattern to create another example of a visitor class, say ASTCounter, which counts the number of AST nodes. The methods in ASTCounter should not use any global or static variables. The ASTCounter class should not have any fields.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: