code: function throwUnexpected(token) {
    if (token.type === TokenEOF) {
      throwError(token, MessageUnexpectedEOS);
    }
  
    if (token.type === TokenNumericLiteral) {
      throwError(token, MessageUnexpectedNumber);
    }
  
    if (token.type === TokenStringLiteral) {
      throwError(token, MessageUnexpectedString);
    }
  
    if (token.type === TokenIdentifier) {
      throwError(token, MessageUnexpectedIdentifier);
    }
  
    if (token.type === TokenKeyword) {
      throwError(token, MessageUnexpectedReserved);
    }
  
    // BooleanLiteral, NullLiteral, or Punctuator.
    throwError(token, MessageUnexpectedToken, token.value);
  }
docs: Throw an exception because of the token.