Add input reference to ast