dmd.expressionsem
Semantic analysis of expressions.
Specification: ($LINK2 https://dlang.org/spec/expression.html, Expressions)
License
Source: expressionsem.d
Documentation: https://dlang.org/phobos/dmd_expressionsem.html
- 
  DeclarationboolexpressionsToString(ref OutBufferbuf, Scope*sc, Expressions*exps);Perform semantic analysis and CTFE on expressions to produce a string. ParametersOutBufferbufappend generated string to buffer Scope*sccontext Expressions*expsarray of Expressions Return Valuetrueon error
- 
  DeclarationStringExpsemanticString(Scope*sc, Expressionexp, const char*s);Resolve expParametersScope*scscope ExpressionexpExpression which expected as a string char*sWhat the string is expected for, will be used in error diagnostic. Return ValueString literal, or nullif error happens.
- 
  DeclarationExpressionresolveOpDollar(Scope*sc, ArrayExpae, Expression*pe0);Runs semantic on ae.arguments. Declares temporary variables if '$' was used.
- 
  DeclarationExpressionresolveOpDollar(Scope*sc, ArrayExpae, IntervalExpie, Expression*pe0);Runs semantic on se.lwr and se.upr. Declares a temporary variable if '$' was used. Return Valueae, or ErrorExp if errors occurred
- 
  DeclarationboolarrayExpressionSemantic(Expression[]exps, Scope*sc, boolpreserveErrors= false);Perform semantic() on an array of Expressions. 
- 
  DeclarationExpressionresolvePropertiesOnly(Scope*sc, Expressione1);If e1is a property function (template), resolve it.
- 
  DeclarationExpressionsymbolToExp(Dsymbols, const ref Locloc, Scope*sc, boolhasOverloads);Turn symbol sParametersDsymbolssymbol to resolve Locloclocation of use of sScope*sccontext boolhasOverloadsapplies if struemeans it'soverloaded and will be resolved later,falsemeans it'sthe exact function symbol.Return ValuesErrorExpif an error occurred
- 
  DeclarationPackageresolveIsPackage(Dsymbolsym);Determines whether a symbol represents a module or package (Used as a helper for is(type == module) and is(type == package)) ParametersDsymbolsymthe symbol to be checked Return Valuethe symbol which symnullif it doesn't represent aPackage)
- 
  DeclarationExpressiontrySemantic(Expressionexp, Scope*sc);Try to run semantic routines. If they fail, return NULL. 
- 
  DeclarationExpressionunaSemantic(UnaExpe, Scope*sc);Helper function for easy error propagation. If error occurs, returns ErrorExp. Otherwise returns NULL. 
- 
  DeclarationExpressionbinSemantic(BinExpe, Scope*sc);Helper function for easy error propagation. If error occurs, returns ErrorExp. Otherwise returns NULL. 
- 
  DeclarationExpressiondotIdSemanticProp(DotIdExpexp, Scope*sc, intflag);Resolve properties, i.e. e1.ident, without seeing UFCS.ParametersDotIdExpexpexpression to resolve Scope*sccontext intflagif 1 then do not emit error messages, just return nullReturn Valueresolved expression, nullif error
- 
  DeclarationboolcheckSharedAccess(Expressione, Scope*sc, boolreturnRef= false);If expression is shared, check that we can access it. Give error message if not. ParametersExpressioneexpression to check Scope*sccontext boolreturnRefWhether this expression is for a returnstatement off areffunction, in which case a single level of dereference is allowed (e.g.shared(int)*).Return Valuetrueon error
- 
  DeclarationboolcheckAddressVar(Scope*sc, Expressionexp, VarDeclarationv);Determine if expParametersScope*sccontext Expressionexpexpression having its address taken VarDeclarationvthe variable getting its address taken Return Valuetrueif ok,falsefor error
- 
  DeclarationboolcheckAddressable(Expressione, Scope*sc);This check ensures that the object in expcan have its address taken, or issue a diagnostic error.ParametersExpressioneexpression to check Scope*sccontext Return Valuetrueif the expression is addressable
- 
  DeclarationExpressiongetThisSkipNestedFuncs(const ref Locloc, Scope*sc, Dsymbols, AggregateDeclarationad, Expressione1, Typet, Dsymbolvar, boolflag= false);Helper function for getRightThis(). Getsthisof the next outer aggregate.ParametersLocloclocation to use for error messages Scope*sccontext Dsymbolsthe parent symbol of the existing thisAggregateDeclarationadstruct or class we need the correct thisforExpressione1existing thisTypettype of the existing thisDsymbolvarthe specific member of adwe're accessingboolflagif true, returnnullinstead of throwing an errorReturn ValueExpression representing the thisfor thevar
- 
  DeclarationVarDeclarationmakeThis2Argument(const ref Locloc, Scope*sc, FuncDeclarationfd);Make a dual-context container for use as a thisargument.ParametersLocloclocation to use for error messages Scope*sccurrent scope FuncDeclarationfdtarget function that will take the thisargumentReturn ValueTemporary closure variable. Note: The function fdfd
- 
  DeclarationboolverifyHookExist(const ref Locloc, ref Scopesc, Identifierid, stringdescription, Identifiermodule_= Id.object);Make sure that the runtime hook idParametersLocloclocation to use for error messages Scopesccurrent scope Identifieridthe hook identifier stringdescriptionwhat the hook does Identifiermodule_what module the hook is located in Return Valuea boolindicating if the hook is present.
- 
  DeclarationExpressiongetVarExp(EnumMemberem, const ref Locloc, Scope*sc);Returns emParametersEnumMemberemthe EnumMember to wrap Locloclocation of use of emScope*scscope of use of emReturn ValueVarExp referenceing emem
- 
  DeclarationExpressiontoBoolean(Expressionexp, Scope*sc);Try to treat expParametersExpressionexpthe expression Scope*scscope to evalute expReturn ValueModified expression on success, ErrorExp on error