REPORT_UNEXPECTED_TOKEN();
CSSParserImpl::ParseDeclaration(PRInt32& aErrorCode,                                nsICSSDeclaration* aDeclaration,                                PRBool aCheckForBraces,                                PRInt32& aChangeHint){  // Get property name  nsCSSToken* tk = &mToken;  nsAutoString propertyName;  for (;;) {    if (!GetToken(aErrorCode, PR_TRUE)) {      return PR_FALSE;    }    if (eCSSToken_Ident == tk->mType) {      propertyName = tk->mIdent;      // grab the ident before the ExpectSymbol trashes the token      if (!ExpectSymbol(aErrorCode, ':', PR_TRUE)) {        return PR_FALSE;      }      break;    }    if (tk->IsSymbol(';')) {      // dangling semicolons are skipped      continue;    }    // Not a declaration...    UngetToken();    return PR_FALSE;  }  // Map property name to it's ID and then parse the property  nsCSSProperty propID = nsCSSProps::LookupProperty(propertyName);  if (eCSSProperty_UNKNOWN == propID) { // unknown property    return PR_FALSE;  }  if (! ParseProperty(aErrorCode, aDeclaration, propID, aChangeHint)) {    return PR_FALSE;  }  // See if the declaration is followed by a "!important" declaration  PRBool isImportant = PR_FALSE;  if (!GetToken(aErrorCode, PR_TRUE)) {    if (aCheckForBraces) {      // Premature eof is not ok when proper termination is mandated      return PR_FALSE;    }    return PR_TRUE;  }  else {    if (eCSSToken_Symbol == tk->mType) {      if ('!' == tk->mSymbol) {        // Look for important ident        if (!GetToken(aErrorCode, PR_TRUE)) {          // Premature eof is not ok          return PR_FALSE;        }        if ((eCSSToken_Ident != tk->mType) ||            !tk->mIdent.EqualsIgnoreCase("important")) {          UngetToken();          return PR_FALSE;        }        isImportant = PR_TRUE;      }      else {        // Not a !important declaration        UngetToken();      }    }    else {      // Not a !important declaration      UngetToken();    }  }  if (PR_TRUE == isImportant) {    aDeclaration->SetValueImportant(propID);  }  // Make sure valid property declaration is terminated with either a  // semicolon or a right-curly-brace (when aCheckForBraces is true).  // When aCheckForBraces is false, proper termination is either  // semicolon or EOF.  if (!GetToken(aErrorCode, PR_TRUE)) {    if (aCheckForBraces) {      // Premature eof is not ok      return PR_FALSE;    }    return PR_TRUE;  }   if (eCSSToken_Symbol == tk->mType) {    if (';' == tk->mSymbol) {      return PR_TRUE;    }    if (!aCheckForBraces) {      // If we didn't hit eof and we didn't see a semicolon then the      // declaration is not properly terminated.      return PR_FALSE;    }    if ('}' == tk->mSymbol) {      UngetToken();      return PR_TRUE;    }  }  return PR_FALSE;}