玩!升级错误:')'预计但找到'}'

时间:2014-04-17 18:58:41

标签: scala playframework-2.0 playframework-2.2 scala-template

刚刚将我们的项目升级为Play! 2.2.1。在修复依赖项,检查代码和修复所有初始编译器错误后,我去启动项目并得到以下内容:

')' expected but '}' found.

它发生在3" view"指向每个文件最后一行的文件。这3个视图的结构与大约30个其他文件完全相同。

我尝试过更改行分隔符,在顶部添加间距等。我还运行了sbt cleanplay clean。不知道。以下是违规文件的示例:

更新:我删除了下面的var userId = "%s";format,并编译了该文件。任何想法是如何相关的?

@(session:play.api.mvc.Session, socialUser: Option[PlatformUser], userProfile: Option[UserProfile], flash:play.api.mvc.Flash)(implicit request: RequestHeader)

@import platform3.util.time.TimeFormats._

@main(session, models.Community.communitySettings(request), "Thanks for signing up!", socialUser, flash, """

  /* injected javascript */
  var userId = "%s";

  $.getJSON("/balance", function(data) {
    $('#title-points').text(data.balance);
    $('.label-points').show();
  });

""" format socialUser.getOrElse("")) {

  <section id="page-title">
    <div class="container">
      <div class="row">
        <div class="span12 text-center">
          <h3>Welcome!</h3>
        </div>
      </div>
    </div>
  </section>


  <section class="featured">
    <div class="featured-text hero-img thanks-img">
      <div class="container">
        <h2><span class="featured-text-bg">You're signed up!</span></h2>
      @socialUser match{
        case Some(u) => {
        <h3><span class="featured-text-bg">Hey @u.firstName, we're excited you</span><br>
        <span class="featured-text-bg">could join us. Click below to</span><br>
        <span class="featured-text-bg">see how you can get started.</span>
        </h3>
        }
        case None => {}
      }
        <div class="sc-button-group">
          <a href="/earn" class="btn btn-large btn-rounded btn-theme"><i class="icon-star icon-large"></i> Earn Points</a>
          <a href="/account" class="btn btn-large btn-rounded">My Account</a>
        </div>
      </div>
    </div>
  </section>

  <section id="content2">
    <div class="container">
      <div class="row margin-30">
        <div class="span9 margin-30">
          <h2 style="color:#626c72" class="margin-20">Your current point balance is <strong><span id="title-points"></span>pts</strong>.</h2>
          <p class="lead">Earning more points is easy! Get involved and earn more rewards quickly.</p>
          <p><b>Visit us</b> in person and sign in to our on-site kiosks.<br>
            <b>Share our content</b> and your experiences across the web and earn more points.</p>
          <p>&nbsp;</p>
          <p><a href="/earn" class="btn btn-large btn-rounded btn-theme"><i class="icon-star icon-large"></i> Earn Points</a>
            <a href="/account" class="btn btn-large btn-rounded">View My Account</a></p>
          <p>&nbsp;</p>
          <p><small>Maximum of 2,500 points can be earned per month per person. Points must be redeemed before midnight of December 31st of each year.</small></p>
        </div>
        <div class="span3 margin-30">
          <p>Earn even more points by connecting your social accounts.</p>
          <p><a href="/connect/facebook"><img src="/assets/img/connect-facebook.jpg" /></a></p>
          <p><a href="/connect/twitter"><img src="/assets/img/connect-twitter.jpg" /></a></p>
          <p><a href="/connect/instagram"><img src="/assets/img/connect-instagram.jpg" /></a></p>
        </div>
      </div>
    </div>
  </section>

}

真的很感谢你的帮助。

0 个答案:

没有答案