ErrorExp

Use this expression for error recovery. It should behave as a 'sink' to prevent further cascaded error messages.

Constructors

this
this()
Undocumented in source.

Members

Functions

accept
void accept(Visitor v)
Undocumented in source. Be warned that the author may not have intended to support it.
toLvalue
Expression toLvalue(Scope* sc, Expression e)
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

errorexp
ErrorExp errorexp;
Undocumented in source but is binding to C++. You might be able to learn more by searching the web for its name.

Inherited Members

From Expression

loc
Loc loc;
Undocumented in source.
type
Type type;
Undocumented in source.
op
TOK op;
Undocumented in source.
size
ubyte size;
Undocumented in source.
parens
ubyte parens;
Undocumented in source.
_init
void _init()
Undocumented in source. Be warned that the author may not have intended to support it.
copy
Expression copy()

Does *not* do a deep copy.

syntaxCopy
Expression syntaxCopy()
Undocumented in source. Be warned that the author may not have intended to support it.
semantic
Expression semantic(Scope* sc)

Semantically analyze Expression. Determine types, fold constants, etc.

trySemantic
Expression trySemantic(Scope* sc)

Try to run semantic routines. If they fail, return NULL.

dyncast
int dyncast()
Undocumented in source. Be warned that the author may not have intended to support it.
print
void print()
Undocumented in source. Be warned that the author may not have intended to support it.
toChars
const(char)* toChars()
Undocumented in source. Be warned that the author may not have intended to support it.
printAST
void printAST(int indent)

Print AST data structure in a nice format.

error
void error(const(char)* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.
warning
void warning(const(char)* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.
deprecation
void deprecation(const(char)* format, ...)
Undocumented in source. Be warned that the author may not have intended to support it.
combine
Expression combine(Expression e1, Expression e2)

Combine e1 and e2 by CommaExp if both are not NULL.

extractLast
Expression extractLast(Expression e, Expression* pe0)

If 'e' is a tree of commas, returns the leftmost expression by stripping off it from the tree. The remained part of the tree is returned via *pe0. Otherwise 'e' is directly returned and *pe0 is set to NULL.

arraySyntaxCopy
Expressions* arraySyntaxCopy(Expressions* exps)
Undocumented in source. Be warned that the author may not have intended to support it.
toInteger
dinteger_t toInteger()
Undocumented in source. Be warned that the author may not have intended to support it.
toUInteger
uinteger_t toUInteger()
Undocumented in source. Be warned that the author may not have intended to support it.
toReal
real_t toReal()
Undocumented in source. Be warned that the author may not have intended to support it.
toImaginary
real_t toImaginary()
Undocumented in source. Be warned that the author may not have intended to support it.
toComplex
complex_t toComplex()
Undocumented in source. Be warned that the author may not have intended to support it.
toStringExp
StringExp toStringExp()
Undocumented in source. Be warned that the author may not have intended to support it.
isLvalue
bool isLvalue()

Return !=0 if expression is an lvalue.

toLvalue
Expression toLvalue(Scope* sc, Expression e)

Give error if we're not an lvalue. If we can, convert expression to be an lvalue.

modifiableLvalue
Expression modifiableLvalue(Scope* sc, Expression e)
Undocumented in source. Be warned that the author may not have intended to support it.
implicitCastTo
Expression implicitCastTo(Scope* sc, Type t)
Undocumented in source. Be warned that the author may not have intended to support it.
implicitConvTo
MATCH implicitConvTo(Type t)
Undocumented in source. Be warned that the author may not have intended to support it.
castTo
Expression castTo(Scope* sc, Type t)
Undocumented in source. Be warned that the author may not have intended to support it.
resolveLoc
Expression resolveLoc(Loc loc, Scope* sc)

Resolve __FILE__, __LINE__, __MODULE__, __FUNCTION__, __PRETTY_FUNCTION__ to loc.

checkType
bool checkType()

Check that the expression has a valid type. If not, generates an error "... has no type".

checkValue
bool checkValue()

Check that the expression has a valid value. If not, generates an error "... has no value".

checkScalar
bool checkScalar()
Undocumented in source. Be warned that the author may not have intended to support it.
checkNoBool
bool checkNoBool()
Undocumented in source. Be warned that the author may not have intended to support it.
checkIntegral
bool checkIntegral()
Undocumented in source. Be warned that the author may not have intended to support it.
checkArithmetic
bool checkArithmetic()
Undocumented in source. Be warned that the author may not have intended to support it.
checkDeprecated
void checkDeprecated(Scope* sc, Dsymbol s)
Undocumented in source. Be warned that the author may not have intended to support it.
checkPurity
bool checkPurity(Scope* sc, FuncDeclaration f)

Calling function f. Check the purity, i.e. if we're in a pure function we can only call other pure functions. Returns true if error occurs.

checkPurity
bool checkPurity(Scope* sc, VarDeclaration v)

Accessing variable v. Check for purity and safety violations. Returns true if error occurs.

checkSafety
bool checkSafety(Scope* sc, FuncDeclaration f)

Calling function f. Check the safety, i.e. if we're in a @safe function we can only call @safe or @trusted functions. Returns true if error occurs.

checkNogc
bool checkNogc(Scope* sc, FuncDeclaration f)

Calling function f. Check the @nogc-ness, i.e. if we're in a @nogc function we can only call other @nogc functions. Returns true if error occurs.

checkPostblit
bool checkPostblit(Scope* sc, Type t)

Check that the postblit is callable if t is an array of structs. Returns true if error happens.

checkRightThis
bool checkRightThis(Scope* sc)
Undocumented in source. Be warned that the author may not have intended to support it.
checkReadModifyWrite
bool checkReadModifyWrite(TOK rmwOp, Expression ex)

Check whether the expression allows RMW operations, error with rmw operator diagnostic if not. ex is the RHS expression, or NULL if ++/-- is used (for diagnostics) Returns true if error occurs.

checkModifiable
int checkModifiable(Scope* sc, int flag)
toBoolean
Expression toBoolean(Scope* sc)

If expression can be tested for true or false, returns the modified expression. Otherwise returns ErrorExp.

addDtorHook
Expression addDtorHook(Scope* sc)

Destructors are attached to VarDeclarations. Hence, if expression returns a temp that needs a destructor, make sure and create a VarDeclaration for that temp.

addressOf
Expression addressOf()

Take address of expression.

deref
Expression deref()

If this is a reference, dereference it.

optimize
Expression optimize(int result, bool keepLvalue)
Undocumented in source. Be warned that the author may not have intended to support it.
ctfeInterpret
Expression ctfeInterpret()
Undocumented in source. Be warned that the author may not have intended to support it.
isConst
int isConst()
Undocumented in source. Be warned that the author may not have intended to support it.
isBool
bool isBool(bool result)

Does this expression statically evaluate to a boolean 'result' (true or false)?

op_overload
Expression op_overload(Scope* sc)
Undocumented in source. Be warned that the author may not have intended to support it.
accept
void accept(Visitor v)
Undocumented in source. Be warned that the author may not have intended to support it.

Meta