Interface IASTUnaryExpression

    • Field Detail

      • op_prefixIncr

        static final int op_prefixIncr
        Prefix increment. op_prefixIncr: ++exp
        See Also:
        Constant Field Values
      • op_prefixDecr

        static final int op_prefixDecr
        Prefix decrement. op_prefixDecr: --exp
        See Also:
        Constant Field Values
      • op_postFixIncr

        static final int op_postFixIncr
        Postfix increment. op_postFixIncr: exp++
        See Also:
        Constant Field Values
      • op_postFixDecr

        static final int op_postFixDecr
        Postfix decrement. op_postFixDecr: exp--
        See Also:
        Constant Field Values
      • op_bracketedPrimary

        static final int op_bracketedPrimary
        A bracketed expression. op_bracketedPrimary: ( exp )
        See Also:
        Constant Field Values
      • op_typeid

        static final int op_typeid
        For C++, only. op_typeid: typeid( exp )
        See Also:
        Constant Field Values
      • op_typeof

        @Deprecated
        static final int op_typeof
        Deprecated.
        Shall not be used, 'typeof something' is not an expression, it's a declaration specifier.
        See Also:
        Constant Field Values
        Restriction:
        This field is not intended to be referenced by clients.
      • op_alignOf

        static final int op_alignOf
        For GCC parsers, only. op_alignOf is used for __alignOf( unaryExpression ) type expressions.
        See Also:
        Constant Field Values
      • op_sizeofParameterPack

        static final int op_sizeofParameterPack
        For C++, only: 'sizeof... ( parameterPack )'
        Since:
        5.2
        See Also:
        Constant Field Values
      • op_noexcept

        static final int op_noexcept
        For C++, only: noexcept ( expression )
        Since:
        5.5
        See Also:
        Constant Field Values
      • op_labelReference

        static final int op_labelReference
        For GCC parsers, only. op_labelReference is used for &&label type expressions.
        Since:
        5.8
        See Also:
        Constant Field Values
      • op_integerPack

        static final int op_integerPack
        For GCC parsers in C++ mode, only: '__integer_pack ( expression )'
        Since:
        6.11
        See Also:
        Constant Field Values
      • OPERAND

        static final ASTNodeProperty OPERAND
        OPERAND represents the relationship between an IASTUnaryExpression and it's nested IASTExpression.
    • Method Detail

      • getOperator

        int getOperator()
        Returns the operator/kind.
        Returns:
        the operator, one of op_* constants defined in this interface.
      • setOperator

        void setOperator​(int operator)
        Sets the operator/kind.
        Parameters:
        operator - the operator, one of op_* constants defined in this interface.
      • getOperand

        IASTExpression getOperand()
        Returns the operand.
        Returns:
        IASTExpression
      • setOperand

        void setOperand​(IASTExpression expression)
        Sets the operand.
        Parameters:
        expression - IASTExpression
      • copy

        IASTUnaryExpression copy()
        Description copied from interface: IASTNode
        Returns a mutable copy of the tree rooted at this node. The following postconditions hold:
         copy.getParent() == null
         copy.getPropertyInParent() == null
         copy.isFrozen() == false
         
        Preprocessor nodes do not currently support being copied. Implicit name nodes are not copied, instead they can be regenerated if required.

        Calling this method is equivalent to copy(CopyStyle.withoutLocations).

        Specified by:
        copy in interface IASTExpression
        Specified by:
        copy in interface IASTInitializerClause
        Specified by:
        copy in interface IASTNode
        Since:
        5.1
      • copy

        IASTUnaryExpression copy​(IASTNode.CopyStyle style)
        Description copied from interface: IASTNode
        Returns a mutable copy of the tree rooted at this node. The following postconditions hold:
         copy.getParent() == null
         copy.getPropertyInParent() == null
         copy.isFrozen() == false
         
        Preprocessor nodes do not currently support being copied. Implicit name nodes are not copied, instead they can be regenerated if required.
        Specified by:
        copy in interface IASTExpression
        Specified by:
        copy in interface IASTInitializerClause
        Specified by:
        copy in interface IASTNode
        Parameters:
        style - IASTNode.CopyStyle create a copy with or without locations. Please see IASTNode.CopyStyle for restrictions on copies with Locations.
        Since:
        5.3