Compiler implementation of the D programming language.
Perform semantic analysis and CTFE on expressions to produce a string.
OutBuffer buf
| append generated string to buffer |
Scope* sc
| context |
Expressions* exps
| array of Expressions |
Resolve exp
as a compile-time known string.
Scope* sc
| scope |
Expression exp
| Expression which expected as a string |
char* s
| What the string is expected for, will be used in error diagnostic. |
null
if error happens.Runs semantic on ae.arguments. Declares temporary variables if '$' was used.
Runs semantic on se.lwr and se.upr. Declares a temporary variable if '$' was used.
Perform semantic() on an array of Expressions.
If e1 is a property function (template), resolve it.
Turn symbol s
into the expression it represents.
Dsymbol s
| symbol to resolve |
Loc loc
| location of use of s
|
Scope* sc
| context |
bool hasOverloads
| applies if s represents a function. true means it's overloaded and will be resolved later, false means it's the exact function symbol. |
s
turned into an expression, ErrorExp
if an error occurredDetermines whether a symbol represents a module or package (Used as a helper for is(type == module) and is(type == package))
Dsymbol sym
| the symbol to be checked |
sym
represents (or null
if it doesn't represent a Package
)Try to run semantic routines. If they fail, return NULL.
Helper function for easy error propagation. If error occurs, returns ErrorExp. Otherwise returns NULL.
Helper function for easy error propagation. If error occurs, returns ErrorExp. Otherwise returns NULL.
If expression is shared, check that we can access it. Give error message if not.
Expression e
| expression to check |
Scope* sc
| context |
Helper function for getRightThis()
. Gets this
of the next outer aggregate.
Loc loc
| location to use for error messages |
Scope* sc
| context |
Dsymbol s
| the parent symbol of the existing this
|
AggregateDeclaration ad
| struct or class we need the correct this for |
Expression e1
| existing this
|
Type t
| type of the existing this
|
Dsymbol var
| the specific member of ad we're accessing |
bool flag
| if true, return null instead of throwing an error |
this
for the varMake a dual-context container for use as a this
argument.
Loc loc
| location to use for error messages |
Scope* sc
| current scope |
FuncDeclaration fd
| target function that will take the this argument |
fd
is added to the nested references of the newly created variable such that a closure is made for the variable when the address of fd
is taken.Make sure that the runtime hook id
exists.
Loc loc
| location to use for error messages |
Scope sc
| current scope |
Identifier id
| the hook identifier |
string description
| what the hook does |
Identifier module_
| what module the hook is located in |
bool
indicating if the hook is present.
© 1999–2019 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/dmd_expressionsem.html