evalStaticCondition

Semantically analyze and then evaluate a static condition at compile time. This is special because short circuit operators &&, || and ?: at the top level are not semantically analyzed if the result of the expression is not necessary.

bool
evalStaticCondition
(,,,
out bool errors
,
Expressions* negatives = null
)

Parameters

sc
Type: Scope*

instantiating scope

original

original expression, for error messages

e

resulting expression

errors
Type: bool

set to true if errors occurred

negatives

array to store negative clauses

Return Value

Type: bool

true if evaluates to true

Meta