Lines Matching defs:loc

28 EnumDeclaration::EnumDeclaration(Loc loc, Identifier *id, Type *memtype)
32 this->loc = loc;
49 EnumDeclaration *ed = new EnumDeclaration(loc, ident,
98 ::error(loc, "circular reference to enum base type %s", memtype->toChars());
117 type = type->semantic(loc, sc);
146 memtype = memtype->semantic(loc, sc);
278 Expression *EnumDeclaration::getMaxMinValue(Loc loc, Identifier *id)
287 error(loc, "recursive definition of .%s property", id->toChars());
303 return memtype->getProperty(loc, id, 0);
311 error(loc, "has no .%s property because base type %s is not an integral type",
343 Expression *ec = new CmpExp(id == Id::max ? TOKgt : TOKlt, em->loc, e, *pval);
358 e->loc = loc;
382 Expression *EnumDeclaration::getDefaultValue(Loc loc)
398 return memtype->defaultInit(loc);
401 error(loc, "forward reference of %s.init", toChars());
420 Type *EnumDeclaration::getMemtype(Loc loc)
422 if (loc.linnum == 0)
423 loc = this->loc;
430 memtype = memtype->semantic(loc, _scope);
443 error(loc, "is forward referenced looking for base type");
477 Dsymbol *EnumDeclaration::search(const Loc &loc, Identifier *ident, int flags)
493 Dsymbol *s = ScopeDsymbol::search(loc, ident, flags);
499 EnumMember::EnumMember(Loc loc, Identifier *id, Expression *value, Type *origType)
500 : VarDeclaration(loc, NULL, id ? id : Id::empty, new ExpInitializer(loc, value))
515 return new EnumMember(loc, ident,
563 origType = origType->semantic(loc, sc);
650 Expression *e = new IntegerExp(loc, 0, Type::tint32);
689 Expression *emax = tprev->getProperty(ed->loc, Id::max, 0);
696 Expression *e = new EqualExp(TOKequal, loc, eprev, emax);
706 e = new AddExp(loc, eprev, new IntegerExp(loc, 1, Type::tint32));
715 origValue = new AddExp(loc, emprev->origValue, new IntegerExp(loc, 1, Type::tint32));
725 Expression *etest = new EqualExp(TOKequal, loc, e, eprev);
743 Expression *EnumMember::getVarExp(Loc loc, Scope *sc)
748 Expression *e = new VarExp(loc, this);