Lines Matching defs:exp2
3069 bool ParserImpl::IsPropertyKeysAreSame(const ir::Expression *exp1, const ir::Expression *exp2)
3071 if (exp1->IsIdentifier() && exp2->IsIdentifier()) {
3072 return exp1->AsIdentifier()->Name() == exp2->AsIdentifier()->Name();
3075 if (exp1->IsIdentifier() && exp2->IsStringLiteral()) {
3076 return exp1->AsIdentifier()->Name() == exp2->AsStringLiteral()->Str();
3079 if (exp1->IsStringLiteral() && exp2->IsStringLiteral()) {
3080 return *exp1->AsStringLiteral() == *exp2->AsStringLiteral();
3083 if (exp1->IsStringLiteral() && exp2->IsIdentifier()) {
3084 return exp1->AsStringLiteral()->Str() == exp2->AsIdentifier()->Name();
3087 if (exp1->IsStringLiteral() && exp2->IsNumberLiteral()) {
3088 std::string exp2String = std::to_string(exp2->AsNumberLiteral()->Number<double>());
3093 if (exp1->IsNumberLiteral() && exp2->IsNumberLiteral()) {
3094 return exp1->AsNumberLiteral()->Number<double>() == exp2->AsNumberLiteral()->Number<double>();
3097 if (exp1->IsNumberLiteral() && exp2->IsStringLiteral()) {
3100 return exp1String == exp2->AsStringLiteral()->Str().Utf8();