GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Static Public Member Functions | Protected Member Functions | List of all members
gd::ExpressionVariableOwnerFinder Class Reference

Find the object name that should be used as a context of the expression or sub-expression that a given node represents. More...

#include <ExpressionVariableOwnerFinder.h>

Inherits gd::ExpressionParser2NodeWorker.

Static Public Member Functions

static const gd::String GetObjectName (const gd::Platform &platform, const gd::ObjectsContainersList &objectsContainersList, const gd::String &rootObjectName, gd::ExpressionNode &node)
 Helper function to find the object name that should be used as a context of the expression or sub-expression that a given node represents.
 

Protected Member Functions

 ExpressionVariableOwnerFinder (const gd::Platform &platform_, const gd::ObjectsContainersList &objectsContainersList_, const gd::String &rootObjectName_)
 
const gd::StringGetObjectName ()
 Get all the errors. More...
 
void OnVisitSubExpressionNode (SubExpressionNode &node) override
 
void OnVisitOperatorNode (OperatorNode &node) override
 
void OnVisitUnaryOperatorNode (UnaryOperatorNode &node) override
 
void OnVisitNumberNode (NumberNode &node) override
 
void OnVisitTextNode (TextNode &node) override
 
void OnVisitVariableNode (VariableNode &node) override
 
void OnVisitVariableAccessorNode (VariableAccessorNode &node) override
 
void OnVisitIdentifierNode (IdentifierNode &node) override
 
void OnVisitEmptyNode (EmptyNode &node) override
 
void OnVisitObjectFunctionNameNode (ObjectFunctionNameNode &node) override
 
void OnVisitVariableBracketAccessorNode (VariableBracketAccessorNode &node) override
 
void OnVisitFunctionCallNode (FunctionCallNode &functionCall) override
 

Detailed Description

Find the object name that should be used as a context of the expression or sub-expression that a given node represents.

This is needed because of the legacy convention where a "objectvar" parameter represents a variable of the object represented by the previous "object" parameter.

See also
gd::ExpressionParser2

Member Function Documentation

◆ GetObjectName()

const gd::String& gd::ExpressionVariableOwnerFinder::GetObjectName ( )
inlineprotected

Get all the errors.

No errors means that the expression is valid.


The documentation for this class was generated from the following file: