Lines Matching refs:loc

41 bool checkAccess(AggregateDeclaration *ad, Loc loc, Scope *sc, Dsymbol *smember);
53 Expression *resolve(Loc loc, Scope *sc, Dsymbol *s, bool hasOverloads);
66 Expression *getRightThis(Loc loc, Scope *sc, AggregateDeclaration *ad,
102 e1 = new DotVarExp(loc, e1, tcd->vthis);
121 e1 = new VarExp(loc, f->vthis);
245 Loc loc = e1->loc;
282 FuncDeclaration *f = resolveFuncCall(loc, sc, os->a[i], tiargs, tthis, &a, 1);
293 Expression *e = new CallExp(loc, e1, e2);
300 FuncDeclaration *f = resolveFuncCall(loc, sc, os->a[i], tiargs, tthis, NULL, 1);
314 Expression *e = new CallExp(loc, e1);
316 e = new AssignExp(loc, e, e2);
394 FuncDeclaration *fd = resolveFuncCall(loc, sc, s, tiargs, tthis, &a, 1);
400 Expression *e = new CallExp(loc, e1, e2);
405 FuncDeclaration *fd = resolveFuncCall(loc, sc, s, tiargs, tthis, NULL, 1);
414 Expression *e = new CallExp(loc, e1);
416 e = new AssignExp(loc, e, e2);
425 Expression *e = new CallExp(loc, e1, e2);
452 Expression *e = new CallExp(loc, e1);
473 error(loc, "cannot resolve type for %s", e1->toChars());
479 error(loc, "not a property %s", e1->toChars());
483 error(loc, "%s is not an lvalue", e1->toChars());
636 static Dsymbol *searchScopes(Scope *sc, Loc loc, Identifier *ident, int flags)
645 s = scx->scopesym->search(loc, ident, flags);
678 Loc loc = ue->loc;
688 sold = searchScopes(sc, loc, ident, flags | IgnoreSymbolVisibility);
697 s = searchScopes(sc, loc, ident, flags | SearchLocalsOnly);
701 s = searchScopes(sc, loc, ident, flags | SearchImportsOnly);
709 s = searchScopes(sc, loc, ident, flags | SearchLocalsOnly | IgnoreSymbolVisibility);
711 s = searchScopes(sc, loc, ident, flags | SearchImportsOnly | IgnoreSymbolVisibility);
713 ::deprecation(loc, "%s is not visible from module %s", s->toPrettyChars(), sc->_module->toChars());
720 Scope::deprecation10378(loc, sold, snew);
727 return ue->e1->type->Type::getProperty(loc, ident, 0);
744 TemplateInstance *ti = new TemplateInstance(loc, s->ident);
748 return new ScopeExp(loc, ti);
753 return new DsymbolExp(loc, s);
774 Loc loc = ce->loc;
829 return new RemoveExp(loc, eleft, key);
882 Loc loc = e1->loc;
917 ex = new CallExp(loc, ex, a1);
926 e = new CallExp(loc, e, a2);
932 ex = new AssignExp(loc, ex, e2);
950 e = new CallExp(loc, e, arguments);
1088 e = new DotVarExp(exp->loc, exp, d);
1167 condexp.loc = e->loc;
1291 bool checkDefCtor(Loc loc, Type *t)
1299 sd->error(loc, "default construction is disabled");
1330 Expression *de = new DeclarationExp(e->loc, tmp);
1331 Expression *ve = new VarExp(e->loc, tmp);
1376 bool functionParameters(Loc loc, Scope *sc, TypeFunction *tf,
1392 error(loc, "expected %llu arguments, not %llu for non-variadic function type %s", (ulonglong)nparams, (ulonglong)nargs, tf->toChars());
1452 error(loc, "expected %llu function arguments, not %llu", (ulonglong)nparams, (ulonglong)nargs);
1458 arg = arg->resolveLoc(loc, sc);
1473 { error(loc, "expected %llu function arguments, not %llu", (ulonglong)nparams, (ulonglong)nargs);
1511 arg = new ArrayLiteralExp(loc, tbn->sarrayOf(nargs - i), elements);
1514 arg = new SliceExp(loc, arg, NULL, NULL);
1528 arg = new NewExp(loc, NULL, NULL, p->type, args);
1534 error(loc, "not enough arguments");
1606 error(loc, "modify inout to %s is not allowed inside inout function", s);
1651 err |= checkDefCtor(arg->loc, t); // t must be default constructible
1761 if (ts->size(arg->loc) == 0)
1762 arg = new NullExp(arg->loc, ta);
1839 gate = new VarDeclaration(loc, Type::tbool, idtmp, NULL);
1843 Expression *ae = new DeclarationExp(loc, gate);
1893 e = new OrOrExp(e->loc, new VarExp(e->loc, gate), e);
1899 DeclarationExp *ae = new DeclarationExp(loc, tmp);
1903 arg = new VarExp(loc, tmp);
1907 arg = new PtrExp(loc, arg);
1921 Expression *e = new AssignExp(gate->loc, new VarExp(gate->loc, gate), new IntegerExp(gate->loc, 1, Type::tbool));
1956 Expression *e = new TypeidExp(loc, tup);
1964 //printf("[%s] fd = %s %s, %d %d %d\n", loc.toChars(), fd->toChars(), fd->type->toChars(),
1981 ::error(loc, "inout constructor %s creates%s object, not%s",
2002 Expression::Expression(Loc loc, TOK op, int size)
2005 this->loc = loc;
2065 ::verror(loc, format, ap);
2076 ::vwarning(loc, format, ap);
2087 ::vdeprecation(loc, format, ap);
2101 e1 = new CommaExp(e1->loc, e1, e2);
2206 else if (!loc.filename)
2207 loc = e->loc;
2344 s->checkDeprecated(loc, sc);
2601 if (loc.linnum == 0) // e.g. implicitly generated dtor
2602 loc = sc->func->loc;
2633 if (loc.linnum == 0) // e.g. implicitly generated dtor
2634 loc = sc->func->loc;
2664 sd->error(loc, "is not copyable because it is annotated with @disable");
2671 //checkAccess(sd, loc, sc, sd->postblit); // necessary?
2756 e = new CastExp(loc, e, Type::tbool);
2789 Expression *e = new AddrExp(loc, this);
2804 Expression *e = new PtrExp(loc, this);
2820 * Resolve __FILE__, __LINE__, __MODULE__, __FUNCTION__, __PRETTY_FUNCTION__ to loc.
2857 IntegerExp::IntegerExp(Loc loc, dinteger_t value, Type *type)
2858 : Expression(loc, TOKint64, sizeof(IntegerExp))
2864 //printf("%s, loc = %d\n", toChars(), loc.linnum);
2880 IntegerExp *IntegerExp::create(Loc loc, dinteger_t value, Type *type)
2882 return new IntegerExp(loc, value, type);
2976 else if (!loc.filename)
2977 loc = e->loc;
3001 RealExp::RealExp(Loc loc, real_t value, Type *type)
3002 : Expression(loc, TOKfloat64, sizeof(RealExp))
3009 RealExp *RealExp::create(Loc loc, real_t value, Type *type)
3011 return new RealExp(loc, value,type);
3074 ComplexExp::ComplexExp(Loc loc, complex_t value, Type *type)
3075 : Expression(loc, TOKcomplex80, sizeof(ComplexExp)), value(value)
3081 ComplexExp *ComplexExp::create(Loc loc, complex_t value, Type *type)
3083 return new ComplexExp(loc, value, type);
3138 IdentifierExp::IdentifierExp(Loc loc, Identifier *ident)
3139 : Expression(loc, TOKidentifier, sizeof(IdentifierExp))
3144 IdentifierExp *IdentifierExp::create(Loc loc, Identifier *ident)
3146 return new IdentifierExp(loc, ident);
3161 DollarExp::DollarExp(Loc loc)
3162 : IdentifierExp(loc, Id::dollar)
3168 DsymbolExp::DsymbolExp(Loc loc, Dsymbol *s, bool hasOverloads)
3169 : Expression(loc, TOKdsymbol, sizeof(DsymbolExp))
3182 Expression *resolve(Loc loc, Scope *sc, Dsymbol *s, bool hasOverloads)
3198 s->checkDeprecated(loc, sc);
3205 s->checkDeprecated(loc, sc);
3210 return em->getVarExp(loc, sc);
3219 ::error(loc, "circular reference to %s '%s'", v->kind(), v->toPrettyChars());
3221 ::error(loc, "forward reference to %s '%s'", v->kind(), v->toPrettyChars());
3231 ::error(loc, "circular initialization of %s '%s'", v->kind(), v->toPrettyChars());
3235 e = v->expandInitializer(loc);
3243 if (v->checkNestedReference(sc, loc))
3247 e = new DotVarExp(loc, new ThisExp(loc), v);
3249 e = new VarExp(loc, v);
3256 e = new FuncExp(loc, fld);
3265 if (!hasOverloads && f->checkForwardRef(loc))
3270 return new VarExp(loc, fd, hasOverloads);
3274 e = new VarExp(loc, od, true);
3281 return new OverExp(loc, o);
3288 ::error(loc, "forward reference of import %s", imp->toChars());
3291 ScopeExp *ie = new ScopeExp(loc, imp->pkg);
3296 ScopeExp *ie = new ScopeExp(loc, pkg);
3301 ScopeExp *ie = new ScopeExp(loc, mod);
3307 ScopeExp *ie = new ScopeExp(loc, ns);
3313 return semantic(new TypeExp(loc, t), sc);
3319 e = new DotVarExp(loc, new ThisExp(loc), tup);
3321 e = new TupleExp(loc, tup);
3334 e = new ScopeExp(loc, ti);
3346 e = new DotTemplateExp(loc, new ThisExp(loc), td);
3349 e = new TemplateExp(loc, td);
3354 ::error(loc, "%s '%s' is not a variable", s->kind(), s->toChars());
3370 ThisExp::ThisExp(Loc loc)
3371 : Expression(loc, TOKthis, sizeof(ThisExp))
3373 //printf("ThisExp::ThisExp() loc = %d\n", loc.linnum);
3400 SuperExp::SuperExp(Loc loc)
3401 : ThisExp(loc)
3408 NullExp::NullExp(Loc loc, Type *type)
3409 : Expression(loc, TOKnull, sizeof(NullExp))
3438 StringExp *se = new StringExp(loc, (char*)mem.xcalloc(1, 1), 0);
3447 StringExp::StringExp(Loc loc, char *string)
3448 : Expression(loc, TOKstring, sizeof(StringExp))
3458 StringExp::StringExp(Loc loc, void *string, size_t len)
3459 : Expression(loc, TOKstring, sizeof(StringExp))
3469 StringExp::StringExp(Loc loc, void *string, size_t len, utf8_t postfix)
3470 : Expression(loc, TOKstring, sizeof(StringExp))
3480 StringExp *StringExp::create(Loc loc, char *s)
3482 return new StringExp(loc, s);
3485 StringExp *StringExp::create(Loc loc, void *string, size_t len)
3487 return new StringExp(loc, string, len);
3750 ArrayLiteralExp::ArrayLiteralExp(Loc loc, Type *type, Expressions *elements)
3751 : Expression(loc, TOKarrayliteral, sizeof(ArrayLiteralExp))
3759 ArrayLiteralExp::ArrayLiteralExp(Loc loc, Type *type, Expression *e)
3760 : Expression(loc, TOKarrayliteral, sizeof(ArrayLiteralExp))
3769 ArrayLiteralExp::ArrayLiteralExp(Loc loc, Type *type, Expression *basis, Expressions *elements)
3770 : Expression(loc, TOKarrayliteral, sizeof(ArrayLiteralExp))
3778 ArrayLiteralExp *ArrayLiteralExp::create(Loc loc, Expressions *elements)
3780 return new ArrayLiteralExp(loc, NULL, elements);
3817 return new ArrayLiteralExp(loc,
3914 StringExp *se = new StringExp(loc, buf.extractData(), len, prefix);
3926 AssocArrayLiteralExp::AssocArrayLiteralExp(Loc loc,
3928 : Expression(loc, TOKassocarrayliteral, sizeof(AssocArrayLiteralExp))
3966 return new AssocArrayLiteralExp(loc,
3980 StructLiteralExp::StructLiteralExp(Loc loc, StructDeclaration *sd, Expressions *elements, Type *stype)
3981 : Expression(loc, TOKstructliteral, sizeof(StructLiteralExp))
3997 StructLiteralExp *StructLiteralExp::create(Loc loc, StructDeclaration *sd, void *elements, Type *stype)
3999 return new StructLiteralExp(loc, sd, (Expressions *)elements, stype);
4029 StructLiteralExp *exp = new StructLiteralExp(loc, sd, arraySyntaxCopy(elements), type ? type : stype);
4053 Expression *ae = new DeclarationExp(loc, tmp);
4054 Expression *e = new CommaExp(loc, ae, new VarExp(loc, tmp));
4095 e = new ArrayLiteralExp(loc, type, z);
4155 DotIdExp *typeDotIdExp(Loc loc, Type *type, Identifier *ident)
4157 return new DotIdExp(loc, new TypeExp(loc, type), ident);
4165 TypeExp::TypeExp(Loc loc, Type *type)
4166 : Expression(loc, TOKtype, sizeof(TypeExp))
4174 return new TypeExp(loc, type->syntaxCopy());
4199 ScopeExp::ScopeExp(Loc loc, ScopeDsymbol *sds)
4200 : Expression(loc, TOKscope, sizeof(ScopeExp))
4210 return new ScopeExp(loc, (ScopeDsymbol *)sds->syntaxCopy(NULL));
4244 TemplateExp::TemplateExp(Loc loc, TemplateDeclaration *td, FuncDeclaration *fd)
4245 : Expression(loc, TOKtemplate, sizeof(TemplateExp))
4275 return resolve(loc, sc, fd, true);
4282 NewExp::NewExp(Loc loc, Expression *thisexp, Expressions *newargs,
4284 : Expression(loc, TOKnew, sizeof(NewExp))
4296 NewExp *NewExp::create(Loc loc, Expression *thisexp, Expressions *newargs,
4299 return new NewExp(loc, thisexp, newargs, newtype, arguments);
4304 return new NewExp(loc,
4312 NewAnonClassExp::NewAnonClassExp(Loc loc, Expression *thisexp,
4314 : Expression(loc, TOKnewanonclass, sizeof(NewAnonClassExp))
4324 return new NewAnonClassExp(loc,
4333 SymbolExp::SymbolExp(Loc loc, TOK op, int size, Declaration *var, bool hasOverloads)
4334 : Expression(loc, op, size)
4343 SymOffExp::SymOffExp(Loc loc, Declaration *var, dinteger_t offset, bool hasOverloads)
4344 : SymbolExp(loc, TOKsymoff, sizeof(SymOffExp), var,
4352 ::error(loc, "need 'this' for address of %s", v->toChars());
4364 VarExp::VarExp(Loc loc, Declaration *var, bool hasOverloads)
4365 : SymbolExp(loc, TOKvar, sizeof(VarExp), var,
4368 //printf("VarExp(this = %p, '%s', loc = %s)\n", this, var->toChars(), loc.toChars());
4373 VarExp *VarExp::create(Loc loc, Declaration *var, bool hasOverloads)
4375 return new VarExp(loc, var, hasOverloads);
4430 return var->checkModify(loc, sc, type, NULL, flag);
4448 OverExp::OverExp(Loc loc, OverloadSet *s)
4449 : Expression(loc, TOKoverloadset, sizeof(OverExp))
4468 TupleExp::TupleExp(Loc loc, Expression *e0, Expressions *exps)
4469 : Expression(loc, TOKtuple, sizeof(TupleExp))
4476 TupleExp::TupleExp(Loc loc, Expressions *exps)
4477 : Expression(loc, TOKtuple, sizeof(TupleExp))
4484 TupleExp::TupleExp(Loc loc, TupleDeclaration *tup)
4485 : Expression(loc, TOKtuple, sizeof(TupleExp))
4498 Expression *e = new DsymbolExp(loc, s);
4504 e->loc = loc; // Bugzilla 15669
4510 Expression *e = new TypeExp(loc, t);
4545 return new TupleExp(loc, e0 ? e0->syntaxCopy() : NULL, arraySyntaxCopy(exps));
4555 FuncExp::FuncExp(Loc loc, Dsymbol *s)
4556 : Expression(loc, TOKfunction, sizeof(FuncExp))
4629 return new FuncExp(loc, td->syntaxCopy(NULL));
4631 return new FuncExp(loc, fd->syntaxCopy(NULL));
4633 return new FuncExp(loc, fd);
4713 TemplateInstance *ti = new TemplateInstance(loc, td, tiargs);
4714 Expression *ex = new ScopeExp(loc, ti);
4828 DeclarationExp::DeclarationExp(Loc loc, Dsymbol *declaration)
4829 : Expression(loc, TOKdeclaration, sizeof(DeclarationExp))
4836 return new DeclarationExp(loc, declaration->syntaxCopy(NULL));
4854 TypeidExp::TypeidExp(Loc loc, RootObject *o)
4855 : Expression(loc, TOKtypeid, sizeof(TypeidExp))
4862 return new TypeidExp(loc, objectSyntaxCopy(obj));
4870 TraitsExp::TraitsExp(Loc loc, Identifier *ident, Objects *args)
4871 : Expression(loc, TOKtraits, sizeof(TraitsExp))
4879 return new TraitsExp(loc, ident, TemplateInstance::arraySyntaxCopy(args));
4884 HaltExp::HaltExp(Loc loc)
4885 : Expression(loc, TOKhalt, sizeof(HaltExp))
4891 IsExp::IsExp(Loc loc, Type *targ, Identifier *id, TOK tok,
4893 : Expression(loc, TOKis, sizeof(IsExp))
4914 return new IsExp(loc,
4927 UnaExp::UnaExp(Loc loc, TOK op, int size, Expression *e1)
4928 : Expression(loc, op, size)
4966 Expression *UnaExp::resolveLoc(Loc loc, Scope *sc)
4968 e1 = e1->resolveLoc(loc, sc);
4974 BinExp::BinExp(Loc loc, TOK op, int size, Expression *e1, Expression *e2)
4975 : Expression(loc, op, size)
5096 e2 = new CommaExp(loc, e2, new RealExp(loc, CTFloat::zero, t1));
5098 Expression *e = new AssignExp(loc, e1, e2);
5114 Expression *e = new AssignExp(loc, e1, e2);
5176 BinAssignExp::BinAssignExp(Loc loc, TOK op, int size, Expression *e1, Expression *e2)
5177 : BinExp(loc, op, size, e1, e2)
5200 CompileExp::CompileExp(Loc loc, Expression *e)
5201 : UnaExp(loc, TOKmixin, sizeof(CompileExp), e)
5207 ImportExp::ImportExp(Loc loc, Expression *e)
5208 : UnaExp(loc, TOKimport, sizeof(ImportExp), e)
5214 AssertExp::AssertExp(Loc loc, Expression *e, Expression *msg)
5215 : UnaExp(loc, TOKassert, sizeof(AssertExp), e)
5222 return new AssertExp(loc, e1->syntaxCopy(), msg ? msg->syntaxCopy() : NULL);
5227 DotIdExp::DotIdExp(Loc loc, Expression *e, Identifier *ident)
5228 : UnaExp(loc, TOKdotid, sizeof(DotIdExp), e)
5235 DotIdExp *DotIdExp::create(Loc loc, Expression *e, Identifier *ident)
5237 return new DotIdExp(loc, e, ident);
5244 DotTemplateExp::DotTemplateExp(Loc loc, Expression *e, TemplateDeclaration *td)
5245 : UnaExp(loc, TOKdottd, sizeof(DotTemplateExp), e)
5265 DotVarExp::DotVarExp(Loc loc, Expression *e, Declaration *var, bool hasOverloads)
5266 : UnaExp(loc, TOKdotvar, sizeof(DotVarExp), e)
5288 int modifyFieldVar(Loc loc, Scope *sc, VarDeclaration *var, Expression *e1)
5334 ::error(loc, "%s field '%s' initialized multiple times", modStr, var->toChars());
5344 ::error(loc, "%s field '%s' initialization is not allowed in loops or after labels", modStr, var->toChars());
5367 ::error(loc, "%s %s '%s' initialization is not allowed in foreach loop",
5373 ::error(loc, "%s %s '%s' initialization is not allowed in nested function '%s'",
5399 return var->checkModify(loc, sc, type, e1, flag);
5416 DotTemplateInstanceExp::DotTemplateInstanceExp(Loc loc, Expression *e, Identifier *name, Objects *tiargs)
5417 : UnaExp(loc, TOKdotti, sizeof(DotTemplateInstanceExp), e)
5420 this->ti = new TemplateInstance(loc, name);
5424 DotTemplateInstanceExp::DotTemplateInstanceExp(Loc loc, Expression *e, TemplateInstance *ti)
5425 : UnaExp(loc, TOKdotti, sizeof(DotTemplateInstanceExp), e)
5432 return new DotTemplateInstanceExp(loc,
5443 Expression *e = new DotIdExp(loc, e1, ti->name);
5463 DelegateExp::DelegateExp(Loc loc, Expression *e, FuncDeclaration *f, bool hasOverloads)
5464 : UnaExp(loc, TOKdelegate, sizeof(DelegateExp), e)
5472 DotTypeExp::DotTypeExp(Loc loc, Expression *e, Dsymbol *s)
5473 : UnaExp(loc, TOKdottype, sizeof(DotTypeExp), e)
5481 CallExp::CallExp(Loc loc, Expression *e, Expressions *exps)
5482 : UnaExp(loc, TOKcall, sizeof(CallExp), e)
5489 CallExp::CallExp(Loc loc, Expression *e)
5490 : UnaExp(loc, TOKcall, sizeof(CallExp), e)
5497 CallExp::CallExp(Loc loc, Expression *e, Expression *earg1)
5498 : UnaExp(loc, TOKcall, sizeof(CallExp), e)
5511 CallExp::CallExp(Loc loc, Expression *e, Expression *earg1, Expression *earg2)
5512 : UnaExp(loc, TOKcall, sizeof(CallExp), e)
5524 CallExp *CallExp::create(Loc loc, Expression *e, Expressions *exps)
5526 return new CallExp(loc, e, exps);
5529 CallExp *CallExp::create(Loc loc, Expression *e)
5531 return new CallExp(loc, e);
5534 CallExp *CallExp::create(Loc loc, Expression *e, Expression *earg1)
5536 return new CallExp(loc, e, earg1);
5541 return new CallExp(loc, e1->syntaxCopy(), arraySyntaxCopy(arguments));
5590 DeclarationExp *de = new DeclarationExp(loc, tmp);
5591 VarExp *ve = new VarExp(loc, tmp);
5592 Expression *e = new CommaExp(loc, de, ve);
5642 AddrExp::AddrExp(Loc loc, Expression *e)
5643 : UnaExp(loc, TOKaddress, sizeof(AddrExp), e)
5647 AddrExp::AddrExp(Loc loc, Expression *e, Type *t)
5648 : UnaExp(loc, TOKaddress, sizeof(AddrExp), e)
5655 PtrExp::PtrExp(Loc loc, Expression *e)
5656 : UnaExp(loc, TOKstar, sizeof(PtrExp), e)
5662 PtrExp::PtrExp(Loc loc, Expression *e, Type *t)
5663 : UnaExp(loc, TOKstar, sizeof(PtrExp), e)
5682 return se->var->checkModify(loc, sc, type, NULL, flag);
5700 NegExp::NegExp(Loc loc, Expression *e)
5701 : UnaExp(loc, TOKneg, sizeof(NegExp), e)
5707 UAddExp::UAddExp(Loc loc, Expression *e)
5708 : UnaExp(loc, TOKuadd, sizeof(UAddExp), e)
5714 ComExp::ComExp(Loc loc, Expression *e)
5715 : UnaExp(loc, TOKtilde, sizeof(ComExp), e)
5721 NotExp::NotExp(Loc loc, Expression *e)
5722 : UnaExp(loc, TOKnot, sizeof(NotExp), e)
5728 DeleteExp::DeleteExp(Loc loc, Expression *e, bool isRAII)
5729 : UnaExp(loc, TOKdelete, sizeof(DeleteExp), e)
5742 CastExp::CastExp(Loc loc, Expression *e, Type *t)
5743 : UnaExp(loc, TOKcast, sizeof(CastExp), e)
5751 CastExp::CastExp(Loc loc, Expression *e, unsigned char mod)
5752 : UnaExp(loc, TOKcast, sizeof(CastExp), e)
5760 return to ? new CastExp(loc, e1->syntaxCopy(), to->syntaxCopy())
5761 : new CastExp(loc, e1->syntaxCopy(), mod);
5766 VectorExp::VectorExp(Loc loc, Expression *e, Type *t)
5767 : UnaExp(loc, TOKvector, sizeof(VectorExp), e)
5775 VectorExp *VectorExp::create(Loc loc, Expression *e, Type *t)
5777 return new VectorExp(loc, e, t);
5782 return new VectorExp(loc, e1->syntaxCopy(), to->syntaxCopy());
5787 VectorArrayExp::VectorArrayExp(Loc loc, Expression *e1)
5788 : UnaExp(loc, TOKvectorarray, sizeof(VectorArrayExp), e1)
5805 SliceExp::SliceExp(Loc loc, Expression *e1, IntervalExp *ie)
5806 : UnaExp(loc, TOKslice, sizeof(SliceExp), e1)
5816 SliceExp::SliceExp(Loc loc, Expression *e1, Expression *lwr, Expression *upr)
5817 : UnaExp(loc, TOKslice, sizeof(SliceExp), e1)
5829 SliceExp *se = new SliceExp(loc, e1->syntaxCopy(),
5876 ArrayLengthExp::ArrayLengthExp(Loc loc, Expression *e1)
5877 : UnaExp(loc, TOKarraylength, sizeof(ArrayLengthExp), e1)
5881 Expression *opAssignToOp(Loc loc, TOK op, Expression *e1, Expression *e2)
5886 case TOKaddass: e = new AddExp(loc, e1, e2); break;
5887 case TOKminass: e = new MinExp(loc, e1, e2); break;
5888 case TOKmulass: e = new MulExp(loc, e1, e2); break;
5889 case TOKdivass: e = new DivExp(loc, e1, e2); break;
5890 case TOKmodass: e = new ModExp(loc, e1, e2); break;
5891 case TOKandass: e = new AndExp(loc, e1, e2); break;
5892 case TOKorass: e = new OrExp (loc, e1, e2); break;
5893 case TOKxorass: e = new XorExp(loc, e1, e2); break;
5894 case TOKshlass: e = new ShlExp(loc, e1, e2); break;
5895 case TOKshrass: e = new ShrExp(loc, e1, e2); break;
5896 case TOKushrass: e = new UshrExp(loc, e1, e2); break;
5920 e = opAssignToOp(exp->loc, exp->op, ale, exp->e2);
5921 e = new AssignExp(exp->loc, ale->syntaxCopy(), e);
5928 VarDeclaration *tmp = copyToTemp(0, "__arraylength", new AddrExp(ale->loc, ale->e1));
5930 Expression *e1 = new ArrayLengthExp(ale->loc, new PtrExp(ale->loc, new VarExp(ale->loc, tmp)));
5932 e = opAssignToOp(exp->loc, exp->op, e1, exp->e2);
5933 e = new AssignExp(exp->loc, elvalue, e);
5934 e = new CommaExp(exp->loc, new DeclarationExp(ale->loc, tmp), e);
5943 IntervalExp::IntervalExp(Loc loc, Expression *lwr, Expression *upr)
5944 : Expression(loc, TOKinterval, sizeof(IntervalExp))
5952 return new IntervalExp(loc, lwr->syntaxCopy(), upr->syntaxCopy());
5957 DelegatePtrExp::DelegatePtrExp(Loc loc, Expression *e1)
5958 : UnaExp(loc, TOKdelegateptr, sizeof(DelegatePtrExp), e1)
5985 DelegateFuncptrExp::DelegateFuncptrExp(Loc loc, Expression *e1)
5986 : UnaExp(loc, TOKdelegatefuncptr, sizeof(DelegateFuncptrExp), e1)
6015 ArrayExp::ArrayExp(Loc loc, Expression *e1, Expression *index)
6016 : UnaExp(loc, TOKarray, sizeof(ArrayExp), e1)
6025 ArrayExp::ArrayExp(Loc loc, Expression *e1, Expressions *args)
6026 : UnaExp(loc, TOKarray, sizeof(ArrayExp), e1)
6035 ArrayExp *ae = new ArrayExp(loc, e1->syntaxCopy(), arraySyntaxCopy(arguments));
6056 DotExp::DotExp(Loc loc, Expression *e1, Expression *e2)
6057 : BinExp(loc, TOKdot, sizeof(DotExp), e1, e2)
6063 CommaExp::CommaExp(Loc loc, Expression *e1, Expression *e2, bool generated)
6064 : BinExp(loc, TOKcomma, sizeof(CommaExp), e1, e2)
6117 IndexExp::IndexExp(Loc loc, Expression *e1, Expression *e2)
6118 : BinExp(loc, TOKindex, sizeof(IndexExp), e1, e2)
6128 IndexExp *ie = new IndexExp(loc, e1->syntaxCopy(), e2->syntaxCopy());
6190 PostExp::PostExp(TOK op, Loc loc, Expression *e)
6191 : BinExp(loc, op, sizeof(PostExp), e,
6192 new IntegerExp(loc, 1, Type::tint32))
6198 PreExp::PreExp(TOK op, Loc loc, Expression *e)
6199 : UnaExp(loc, op, sizeof(PreExp), e)
6207 AssignExp::AssignExp(Loc loc, Expression *e1, Expression *e2)
6208 : BinExp(loc, TOKassign, sizeof(AssignExp), e1, e2)
6252 ConstructExp::ConstructExp(Loc loc, Expression *e1, Expression *e2)
6253 : AssignExp(loc, e1, e2)
6258 ConstructExp::ConstructExp(Loc loc, VarDeclaration *v, Expression *e2)
6259 : AssignExp(loc, new VarExp(loc, v), e2)
6270 BlitExp::BlitExp(Loc loc, Expression *e1, Expression *e2)
6271 : AssignExp(loc, e1, e2)
6276 BlitExp::BlitExp(Loc loc, VarDeclaration *v, Expression *e2)
6277 : AssignExp(loc, new VarExp(loc, v), e2)
6288 AddAssignExp::AddAssignExp(Loc loc, Expression *e1, Expression *e2)
6289 : BinAssignExp(loc, TOKaddass, sizeof(AddAssignExp), e1, e2)
6295 MinAssignExp::MinAssignExp(Loc loc, Expression *e1, Expression *e2)
6296 : BinAssignExp(loc, TOKminass, sizeof(MinAssignExp), e1, e2)
6302 CatAssignExp::CatAssignExp(Loc loc, Expression *e1, Expression *e2)
6303 : BinAssignExp(loc, TOKcatass, sizeof(CatAssignExp), e1, e2)
6309 MulAssignExp::MulAssignExp(Loc loc, Expression *e1, Expression *e2)
6310 : BinAssignExp(loc, TOKmulass, sizeof(MulAssignExp), e1, e2)
6316 DivAssignExp::DivAssignExp(Loc loc, Expression *e1, Expression *e2)
6317 : BinAssignExp(loc, TOKdivass, sizeof(DivAssignExp), e1, e2)
6323 ModAssignExp::ModAssignExp(Loc loc, Expression *e1, Expression *e2)
6324 : BinAssignExp(loc, TOKmodass, sizeof(ModAssignExp), e1, e2)
6330 ShlAssignExp::ShlAssignExp(Loc loc, Expression *e1, Expression *e2)
6331 : BinAssignExp(loc, TOKshlass, sizeof(ShlAssignExp), e1, e2)
6337 ShrAssignExp::ShrAssignExp(Loc loc, Expression *e1, Expression *e2)
6338 : BinAssignExp(loc, TOKshrass, sizeof(ShrAssignExp), e1, e2)
6344 UshrAssignExp::UshrAssignExp(Loc loc, Expression *e1, Expression *e2)
6345 : BinAssignExp(loc, TOKushrass, sizeof(UshrAssignExp), e1, e2)
6351 AndAssignExp::AndAssignExp(Loc loc, Expression *e1, Expression *e2)
6352 : BinAssignExp(loc, TOKandass, sizeof(AndAssignExp), e1, e2)
6358 OrAssignExp::OrAssignExp(Loc loc, Expression *e1, Expression *e2)
6359 : BinAssignExp(loc, TOKorass, sizeof(OrAssignExp), e1, e2)
6365 XorAssignExp::XorAssignExp(Loc loc, Expression *e1, Expression *e2)
6366 : BinAssignExp(loc, TOKxorass, sizeof(XorAssignExp), e1, e2)
6372 PowAssignExp::PowAssignExp(Loc loc, Expression *e1, Expression *e2)
6373 : BinAssignExp(loc, TOKpowass, sizeof(PowAssignExp), e1, e2)
6379 AddExp::AddExp(Loc loc, Expression *e1, Expression *e2)
6380 : BinExp(loc, TOKadd, sizeof(AddExp), e1, e2)
6386 MinExp::MinExp(Loc loc, Expression *e1, Expression *e2)
6387 : BinExp(loc, TOKmin, sizeof(MinExp), e1, e2)
6393 CatExp::CatExp(Loc loc, Expression *e1, Expression *e2)
6394 : BinExp(loc, TOKcat, sizeof(CatExp), e1, e2)
6400 MulExp::MulExp(Loc loc, Expression *e1, Expression *e2)
6401 : BinExp(loc, TOKmul, sizeof(MulExp), e1, e2)
6407 DivExp::DivExp(Loc loc, Expression *e1, Expression *e2)
6408 : BinExp(loc, TOKdiv, sizeof(DivExp), e1, e2)
6414 ModExp::ModExp(Loc loc, Expression *e1, Expression *e2)
6415 : BinExp(loc, TOKmod, sizeof(ModExp), e1, e2)
6421 PowExp::PowExp(Loc loc, Expression *e1, Expression *e2)
6422 : BinExp(loc, TOKpow, sizeof(PowExp), e1, e2)
6428 ShlExp::ShlExp(Loc loc, Expression *e1, Expression *e2)
6429 : BinExp(loc, TOKshl, sizeof(ShlExp), e1, e2)
6435 ShrExp::ShrExp(Loc loc, Expression *e1, Expression *e2)
6436 : BinExp(loc, TOKshr, sizeof(ShrExp), e1, e2)
6442 UshrExp::UshrExp(Loc loc, Expression *e1, Expression *e2)
6443 : BinExp(loc, TOKushr, sizeof(UshrExp), e1, e2)
6449 AndExp::AndExp(Loc loc, Expression *e1, Expression *e2)
6450 : BinExp(loc, TOKand, sizeof(AndExp), e1, e2)
6456 OrExp::OrExp(Loc loc, Expression *e1, Expression *e2)
6457 : BinExp(loc, TOKor, sizeof(OrExp), e1, e2)
6463 XorExp::XorExp(Loc loc, Expression *e1, Expression *e2)
6464 : BinExp(loc, TOKxor, sizeof(XorExp), e1, e2)
6470 OrOrExp::OrOrExp(Loc loc, Expression *e1, Expression *e2)
6471 : BinExp(loc, TOKoror, sizeof(OrOrExp), e1, e2)
6486 AndAndExp::AndAndExp(Loc loc, Expression *e1, Expression *e2)
6487 : BinExp(loc, TOKandand, sizeof(AndAndExp), e1, e2)
6502 InExp::InExp(Loc loc, Expression *e1, Expression *e2)
6503 : BinExp(loc, TOKin, sizeof(InExp), e1, e2)
6512 RemoveExp::RemoveExp(Loc loc, Expression *e1, Expression *e2)
6513 : BinExp(loc, TOKremove, sizeof(RemoveExp), e1, e2)
6520 CmpExp::CmpExp(TOK op, Loc loc, Expression *e1, Expression *e2)
6521 : BinExp(loc, op, sizeof(CmpExp), e1, e2)
6527 EqualExp::EqualExp(TOK op, Loc loc, Expression *e1, Expression *e2)
6528 : BinExp(loc, op, sizeof(EqualExp), e1, e2)
6535 IdentityExp::IdentityExp(TOK op, Loc loc, Expression *e1, Expression *e2)
6536 : BinExp(loc, op, sizeof(IdentityExp), e1, e2)
6542 CondExp::CondExp(Loc loc, Expression *econd, Expression *e1, Expression *e2)
6543 : BinExp(loc, TOKquestion, sizeof(CondExp), e1, e2)
6550 return new CondExp(loc, econd->syntaxCopy(), e1->syntaxCopy(), e2->syntaxCopy());
6594 Expression *de = new DeclarationExp(ce->econd->loc, vcond);
6597 Expression *ve = new VarExp(ce->econd->loc, vcond);
6602 Expression *ve = new VarExp(vcond->loc, vcond);
6604 v->edtor = new AndAndExp(v->edtor->loc, ve, v->edtor);
6606 v->edtor = new OrOrExp(v->edtor->loc, ve, v->edtor);
6634 return new PtrExp(loc, e, type);
6665 DefaultInitExp::DefaultInitExp(Loc loc, TOK subop, int size)
6666 : Expression(loc, TOKdefault, size)
6673 FileInitExp::FileInitExp(Loc loc, TOK tok)
6674 : DefaultInitExp(loc, tok, sizeof(FileInitExp))
6678 Expression *FileInitExp::resolveLoc(Loc loc, Scope *sc)
6681 const char *s = loc.filename ? loc.filename : sc->_module->ident->toChars();
6684 Expression *e = new StringExp(loc, const_cast<char *>(s));
6692 LineInitExp::LineInitExp(Loc loc)
6693 : DefaultInitExp(loc, TOKline, sizeof(LineInitExp))
6697 Expression *LineInitExp::resolveLoc(Loc loc, Scope *sc)
6699 Expression *e = new IntegerExp(loc, loc.linnum, Type::tint32);
6706 ModuleInitExp::ModuleInitExp(Loc loc)
6707 : DefaultInitExp(loc, TOKmodulestring, sizeof(ModuleInitExp))
6711 Expression *ModuleInitExp::resolveLoc(Loc loc, Scope *sc)
6718 Expression *e = new StringExp(loc, const_cast<char *>(s));
6726 FuncInitExp::FuncInitExp(Loc loc)
6727 : DefaultInitExp(loc, TOKfuncstring, sizeof(FuncInitExp))
6731 Expression *FuncInitExp::resolveLoc(Loc loc, Scope *sc)
6740 Expression *e = new StringExp(loc, const_cast<char *>(s));
6748 PrettyFuncInitExp::PrettyFuncInitExp(Loc loc)
6749 : DefaultInitExp(loc, TOKprettyfunc, sizeof(PrettyFuncInitExp))
6753 Expression *PrettyFuncInitExp::resolveLoc(Loc loc, Scope *sc)
6774 Expression *e = new StringExp(loc, const_cast<char *>(s));
6839 sym->loc = ae->loc;
6851 Expression *de = new DeclarationExp(ae->loc, ae->lengthVar);
6862 Expression *edim = new IntegerExp(ae->loc, i, Type::tsize_t);
6872 FuncDeclaration *fslice = resolveFuncCall(ae->loc, sc, slice, tiargs, ae->e1->type, fargs, 1);
6878 e = new DotTemplateInstanceExp(ae->loc, ae->e1, slice->ident, tiargs);
6879 e = new CallExp(ae->loc, e, fargs);
6948 sym->loc = ae->loc;
6968 Expression *de = new DeclarationExp(ae->loc, ae->lengthVar);