主要内容

Cpp.BinaryExpression Class

Namespace: Cpp
Superclasses: AstNodeProperties

Represents the binary_expression nodes in the syntax tree of your code

Since R2026a

Description

The PQL class BinaryExpression represents the node binary_expression in the syntax tree of your code.

// example.cpp
int main() {
    int a = 1 + 2;
    int b = a * 3;
    bool c = a < b;
    int d = (a + b) / 2;
    (void)c;
    return 0;
}

The code contains several binary_expression nodes such as a * 3 and 1 + 2. These nodes are matched by the BinaryExpression PQL class.

Predicates

expand all

Version History

Introduced in R2026a