JS grammar bug fixed

and Parser is slightly refactored