Add new ast node NodeWithAnswer as a common super class, such that code duplication in Rewriter.java could be eliminated.