update ast nodes with replacements