View source code
Display the source code in dmd/expression.d from which this page was generated on github.
Report a bug
If you spot a problem with this page, click here to create a Bugzilla issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone.

Module dmd.expression

Compiler implementation of the D programming language.

Documentation

https://dlang.org/phobos/dmd_expression.html

Coverage

https://codecov.io/gh/dlang/dmd/src/master/src/dmd/expression.d

Functions

NameDescription
arrayExpressionSemantic(exps, sc, preserveErrors) Perform semantic() on an array of Expressions.
doCopyOrMove(sc, e) Handle the postblit call on lvalue, or the move of rvalue.
expandTuples(exps) Expand tuples.
getFuncTemplateDecl(s) Get TemplateDeclaration enclosing FuncDeclaration.
getRightThis(loc, sc, ad, e1, var, flag) Given var, get the right this pointer if var is in an outer class, but our existing this pointer is in an inner class.
hasThis(sc) Determine if this is available by walking up the enclosing scopes until a function is found.
isAliasThisTuple(e) Expand alias this tuples.
isDotOpDispatch(e) check e is exp.opDispatch!(tiargs) or not It's used to switch to UFCS the semantic analysis path
isNeedThisScope(sc, d) Determine if a this is needed to access d.
RealEquals(x1, x2) Test to see if two reals are the same. Regard NaN's as equivalent. Regard +0 and -0 as different.
resolve(loc, sc, s, hasOverloads) Resolve a symbol s and wraps it in an expression object.
resolveOpDollar(sc, ae, ie, pe0) Runs semantic on se.lwr and se.upr. Declares a temporary variable if '$' was used.
resolveOpDollar(sc, ae, pe0) Runs semantic on ae.arguments. Declares temporary variables if '$' was used.
resolvePropertiesOnly(sc, e1) If e1 is a property function (template), resolve it.
resolveUFCS(sc, ce) Pull out callable entity with UFCS.
resolveUFCSProperties(sc, e1, e2) Pull out property with UFCS.
semanticString(sc, exp, s) Resolve exp as a compile-time known string.
typeDotIdExp(loc, type, ident) TypeDotIdExp
valueNoDtor(e) If we want the value of this expression, but do not want to call the destructor on it.

Classes

NameDescription
AddAssignExp
AddExp
AddrExp
AndAssignExp
AndExp
ArrayExp e1 [ a0, a1, a2, a3 ,... ]
ArrayLengthExp
ArrayLiteralExp [ e1, e2, e3, ... ]
AssertExp
AssignExp
AssocArrayLiteralExp [ key0 : value0, key1 : value1, ... ]
BinAssignExp
BinExp
BlitExp
CallExp
CastExp Possible to cast to one type while painting to another type
CatAssignExp The ~= operator. It can have one of the following operators:
CatExp
CmpExp op is one of: TOK.lessThan, TOK.lessOrEqual, TOK.greaterThan, TOK.greaterOrEqual, TOK.unord, TOK.lg, TOK.leg, TOK.ule, TOK.ul, TOK.uge, TOK.ug, TOK.ue
ComExp
CommaExp
CompileExp
ComplexExp
CondExp econd ? e1 : e2
ConstructExp
DeclarationExp Declaration of a symbol
DefaultInitExp
DelegateExp
DelegateFuncptrExp
DeleteExp
DivAssignExp
DivExp
DollarExp
DotExp
DotIdExp
DotTemplateExp Mainly just a placeholder
DotTemplateInstanceExp foo.bar!(args)
DotTypeExp
DotVarExp
DsymbolExp Won't be generated by parser.
EqualExp == and !=
ErrorExp Use this expression for error recovery. It should behave as a 'sink' to prevent further cascaded error messages.
Expression
FileInitExp
FuncExp Function/Delegate literal
FuncInitExp
HaltExp
IdentifierExp
IdentityExp is and !is
ImportExp
IndexExp e1 [ e2 ]
InExp
IntegerExp
IntervalExp Mainly just a placeholder
IsExp is(targ id tok tspec) is(targ id == tok2)
LineInitExp
LogicalExp
MinAssignExp
MinExp
ModAssignExp
ModExp
ModuleInitExp
MulAssignExp
MulExp
NegExp
NewAnonClassExp thisexp.new(newargs) class baseclasses { } (arguments)
NewExp thisexp.new(newargs) newtype(arguments)
NotExp
NullExp
OrAssignExp
OrExp
OverExp Overload Set
PostExp For both i++ and i--
PowAssignExp
PowExp
PreExp For both ++i and --i
PrettyFuncInitExp
PtrExp
RealExp
RemoveExp This deletes the key e1 from the associative array e2
ScopeExp Mainly just a placeholder of Package, Module, Nspace, and TemplateInstance (including TemplateMixin)
ShlAssignExp
ShlExp
ShrAssignExp
ShrExp
SliceExp e1 [lwr .. upr]
StringExp
StructLiteralExp sd( e1, e2, e3, ... )
SuperExp
SymbolExp
SymOffExp Offset from symbol
TemplateExp Mainly just a placeholder
ThisExp
TraitsExp _traits(identifier, args...)
TupleExp
TypeExp Mainly just a placeholder
TypeidExp typeid(int)
UAddExp
UnaExp
UshrAssignExp
UshrExp
VarExp Variable
VectorExp
XorAssignExp
XorExp

Structs

NameDescription
UnionExp

Manifest constants

NameTypeDescription
stageApply apply is running
stageInlineScan inlineScan is running
stageOptimize optimize is running
stageScrub scrubReturnValue is running
stageSearchPointers hasNonConstPointers is running
stageToCBuffer toCBuffer is running

Authors

Walter Bright

License

Boost License 1.0