CExpression


This module has been removed in release 14.0.0. Use Script module instead.

Represents expression which is a structurized and prepared for calculations data produced from list of tokens.

You can find more information in comments below.

class CExpression
    {
    public:
        CExpression *getParent(); // Return parent expression if exists 
        EXPRESSION_TYPE getType() const; // Return type 
        TOKEN *getBlockOpen(); // Return block opening token or nullptr 
        TOKEN *getBlockClose(); // Return block closing token or nullptr 
        TOKEN *getValue(); // Return value token or nullptr 
        CExpression *getName(); // Return expression used as name(for example, for procedures or subscripts) 
        bool isMath() const; // Return whether the expression is correct mathematecal expression 
        int getPreOperatorCount() const; // Return count of "pre" operators 
        TOKEN *getPreOperator(const int index) const; // Return "pre" operator token by index 
        int getPostOperatorCount() const; // Return count of "post" operators 
        TOKEN *getPostOperator(const int index) const; // Return "post" operator token by index 
        int getItemCount() const; // Return child item count 
        CExpression *getItem(const int index); // Return child item by index 
    
        CExpression(CExpression *parent, const EXPRESSION_TYPE type); // Constructor 
        ~CExpression(); // Destructor 
    
    #ifdef _DEBUG
        void Print(const AnsiString &spaces, const bool recursive); // Print to console 
    #endif
    };
Namespace: nitisa::scripting
Include: Nitisa/Modules/Scripting/Expression.h