CommaExp.allow

If the argument is a CommaExp, set a flag to prevent deprecation messages

It's impossible to know from CommaExp.semantic if the result will be used, hence when there is a result (type != void), a deprecation message is always emitted. However, some construct can produce a result but won't use it (ExpStatement and for loop increment). Those should call this function to prevent unwanted deprecations to be emitted.

class CommaExp
static
void
allow

Parameters

exp

An expression that discards its result. If the argument is null or not a CommaExp, nothing happens.

Meta