dmd.expressionsem - D Programming Language
Description: D Programming Language
Keywords: D programming language

Menu

- Learn
- Documentation
  - Language Reference
  - Library Reference
  - Command-line Reference
  - Feature Overview
  - Articles
- Downloads
- Packages
- Community
  - Blog
  - Orgs using D
  - Twitter
  - Calendar
  - Forums
  - IRC
  - Wiki
  - GitHub
  - Issues
  - Get involved
  - Contributors
  - Foundation
  - Security Team
  - Donate
  - Sponsors
- Resources
  - Tour
  - Books
  - Tutorials
  - Tools
  - Editors
  - IDEs
  - run.dlang.io
  - Visual D
  - Acknowledgments
  - D Style
  - Glossary
  - Sitemap

Search
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:
Walter Bright
License:
Boost License 1.0

Source expressionsem.d

Documentation https://dlang.org/phobos/dmd_expressionsem.html

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

bool `expressionsToString`(ref OutBuffer `buf`, Scope* `sc`, Expressions* `exps`);
  Perform semantic analysis and CTFE on expressions to produce a string.
  Parameters:

  OutBuffer `buf` | append generated string to buffer
  Scope* `sc` | context
  Expressions* `exps` | array of Expressions

  Returns:
  true on error
StringExp `semanticString`(Scope* `sc`, Expression `exp`, const char* `s`);
  Resolve `exp` as a compile-time known string.
  Parameters:

  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.

  Returns:
  String literal, or null if error happens.
Expression `resolveOpDollar`(Scope* `sc`, ArrayExp `ae`, Expression* `pe0`);
  Runs semantic on ae.arguments. Declares temporary variables if '$' was used.
Expression `resolveOpDollar`(Scope* `sc`, ArrayExp `ae`, IntervalExp `ie`, Expression* `pe0`);
  Runs semantic on se.lwr and se.upr. Declares a temporary variable if '$' was used.
bool `arrayExpressionSemantic`(Expressions* `exps`, Scope* `sc`, bool `preserveErrors` = false);
  Perform semantic() on an array of Expressions.
Expression `resolvePropertiesOnly`(Scope* `sc`, Expression `e1`);
  If e1 is a property function (template), resolve it.
Expression `symbolToExp`(Dsymbol `s`, ref const Loc `loc`, Scope* `sc`, bool `hasOverloads`);
  Turn symbol `s` into the expression it represents.
  Parameters:

  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.

  Returns:
  `s` turned into an expression, ErrorExp if an error occurred
Expression `trySemantic`(Expression `exp`, Scope* `sc`);
  Try to run semantic routines. If they fail, return NULL.
Expression `unaSemantic`(UnaExp `e`, Scope* `sc`);
  Helper function for easy error propagation. If error occurs, returns ErrorExp. Otherwise returns NULL.
Expression `binSemantic`(BinExp `e`, Scope* `sc`);
  Helper function for easy error propagation. If error occurs, returns ErrorExp. Otherwise returns NULL.
Expression `getThisSkipNestedFuncs`(ref const Loc `loc`, Scope* `sc`, Dsymbol `s`, AggregateDeclaration `ad`, Expression `e1`, Type `t`, Dsymbol `var`, bool `flag` = false);
  Helper function for getRightThis(). Gets this of the next outer aggregate.
  Parameters:

  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

  Returns:
  Expression representing the this for the var

Copyright © 1999-2019 by the D Language Foundation | Page generated by Ddoc on Sat May 4 21:22:09 2019