add support for arrow operator in scanner
fix potential npe bug