parser: locate errors with locations in ANode