add method implementation in ast builder