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
a local clone.
dmd.expressionsem
Compiler implementation of the
D programming language.
Authors:
License:
Source expressionsem.d
Documentation https://dlang.org/phobos/dmd_expressionsem.html
- bool
expressionsToString(ref OutBufferbuf, Scope*sc, Expressions*exps); - Perform semantic analysis and CTFE on expressions to produce a string.Parameters:
OutBuffer bufappend generated string to buffer Scope* sccontext Expressions* expsarray of Expressions Returns:true on error - StringExp
semanticString(Scope*sc, Expressionexp, const char*s); - Resolve
expas a compile-time known string.Parameters:Scope* scscope Expression expExpression which expected as a string char* sWhat the string is expected for, will be used in error diagnostic. Returns:String literal, or null if error happens. - Expression
resolveOpDollar(Scope*sc, ArrayExpae, Expression*pe0); - Runs semantic on ae.arguments. Declares temporary variables if '$' was used.
- Expression
resolveOpDollar(Scope*sc, ArrayExpae, IntervalExpie, Expression*pe0); - Runs semantic on se.lwr and se.upr. Declares a temporary variable if '$' was used.Returns:ae, or ErrorExp if errors occurred
- bool
arrayExpressionSemantic(Expressions*exps, Scope*sc, boolpreserveErrors= false); - Perform semantic() on an array of Expressions.
- Expression
resolvePropertiesOnly(Scope*sc, Expressione1); - If e1 is a property function (template), resolve it.
- Expression
symbolToExp(Dsymbols, ref const Locloc, Scope*sc, boolhasOverloads); - Turn symbol
sinto the expression it represents.Parameters:Dsymbol ssymbol to resolve Loc loclocation of use of sScope* sccontext bool hasOverloadsapplies if srepresents a function. true means it's overloaded and will be resolved later, false means it's the exact function symbol.Returns:sturned into an expression, ErrorExp if an error occurred - Package
resolveIsPackage(Dsymbolsym); - Determines whether a symbol represents a module or package (Used as a helper for is(type == module) and is(type == package))Parameters:
Dsymbol symthe symbol to be checked Returns:the symbol whichsymrepresents (or null if it doesn't represent a Package) - Expression
trySemantic(Expressionexp, Scope*sc); - Try to run semantic routines. If they fail, return NULL.
- Expression
unaSemantic(UnaExpe, Scope*sc); - Helper function for easy error propagation. If error occurs, returns ErrorExp. Otherwise returns NULL.
- Expression
binSemantic(BinExpe, Scope*sc); - Helper function for easy error propagation. If error occurs, returns ErrorExp. Otherwise returns NULL.
- bool
checkSharedAccess(Expressione, Scope*sc); - If expression is shared, check that we can access it. Give error message if not.Parameters:
Expression eexpression to check Scope* sccontext Returns:true on error - Expression
getThisSkipNestedFuncs(ref const Locloc, Scope*sc, Dsymbols, AggregateDeclarationad, Expressione1, Typet, Dsymbolvar, boolflag= false); - Helper function for getRightThis(). Gets this of the next outer aggregate.Parameters:
Loc loclocation to use for error messages Scope* sccontext Dsymbol sthe parent symbol of the existing this AggregateDeclaration adstruct or class we need the correct this for Expression e1existing this Type ttype of the existing this Dsymbol varthe specific member of ad we're accessing bool flagif true, return null instead of throwing an error Returns:Expression representing the this for the var - VarDeclaration
makeThis2Argument(ref const Locloc, Scope*sc, FuncDeclarationfd); - Make a dual-context container for use as a this argument.Parameters:
Loc loclocation to use for error messages Scope* sccurrent scope FuncDeclaration fdtarget function that will take the this argument Returns:Temporary closure variable.Note The function
fdis added to the nested references of the newly created variable such that a closure is made for the variable when the address offdis taken. - bool
verifyHookExist(ref const Locloc, ref Scopesc, Identifierid, stringdescription, Identifiermodule_= Id.object); - Make sure that the runtime hook
idexists.Parameters:Loc loclocation to use for error messages Scope sccurrent scope Identifier idthe hook identifier string descriptionwhat the hook does Identifier module_what module the hook is located in Returns:a bool indicating if the hook is present.
Copyright © 1999-2019 by the D Language Foundation | Page generated by
Ddoc on Sun Sep 1 19:49:18 2019