주요 콘텐츠

Cpp.IfStatement Class

Namespace: Cpp
Superclasses: AstNodeProperties

Represents the if_statement nodes in the syntax tree of your code

Since R2026a

Description

The PQL class Cpp.IfStatement represents the node if_statement in the syntax tree of your code.

extern void foo(); extern void bar();

int f(int x) {
    if (x > 0) {
        foo();
    } else {
        bar();
    }
    return 0;
}

The if (x > 0) { ... } else { ... } in the example corresponds to the if_statement node represented by Cpp.IfStatement.

Predicates

expand all

Version History

Introduced in R2026a