assign this.ast only in addPropResource
fix a typo in events.js