src/tools/moc/moc.cpp
changeset 30 5dc02b23752f
parent 19 fcece45ef507
child 33 3e2da88830cd
equal deleted inserted replaced
29:b72c6db6890b 30:5dc02b23752f
   228         } else {
   228         } else {
   229             break;
   229             break;
   230         }
   230         }
   231     }
   231     }
   232     while (test(CONST) || test(VOLATILE) || test(SIGNED) || test(UNSIGNED)
   232     while (test(CONST) || test(VOLATILE) || test(SIGNED) || test(UNSIGNED)
   233            || test(STAR) || test(AND)) {
   233            || test(STAR) || test(AND) || test(ANDAND)) {
   234         type.name += ' ';
   234         type.name += ' ';
   235         type.name += lexem();
   235         type.name += lexem();
   236         if (lookup(0) == AND)
   236         if (lookup(0) == AND)
   237             type.referenceType = Type::Reference;
   237             type.referenceType = Type::Reference;
       
   238         else if (lookup(0) == ANDAND)
       
   239             type.referenceType = Type::RValueReference;
   238         else if (lookup(0) == STAR)
   240         else if (lookup(0) == STAR)
   239             type.referenceType = Type::Pointer;
   241             type.referenceType = Type::Pointer;
   240     }
   242     }
   241     // transform stupid things like 'const void' or 'void const' into 'void'
   243     // transform stupid things like 'const void' or 'void const' into 'void'
   242     if (isVoid && type.referenceType == Type::NoReference) {
   244     if (isVoid && type.referenceType == Type::NoReference) {