GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
|
Validate that an expression is properly written by returning any error attached to the nodes during parsing. More...
#include <ExpressionValidator.h>
Inherits gd::ExpressionParser2NodeWorker.
Public Member Functions | |
ExpressionValidator (const gd::Platform &platform_, const gd::ProjectScopedContainers &projectScopedContainers_, const gd::String &rootType_, const gd::String &extraInfo_="") | |
const std::vector< ExpressionParserError * > & | GetFatalErrors () |
Get only the fatal errors. More... | |
const std::vector< ExpressionParserError * > & | GetAllErrors () |
Get all the errors. More... | |
Static Public Member Functions | |
static bool | HasNoErrors (const gd::Platform &platform, const gd::ProjectScopedContainers &projectScopedContainers, const gd::String &rootType, gd::ExpressionNode &node) |
Helper function to check if a given node does not contain any error including non-fatal ones. | |
Protected Member Functions | |
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 | OnVisitVariableBracketAccessorNode (VariableBracketAccessorNode &node) override |
void | OnVisitIdentifierNode (IdentifierNode &node) override |
void | OnVisitObjectFunctionNameNode (ObjectFunctionNameNode &node) override |
void | OnVisitFunctionCallNode (FunctionCallNode &node) override |
void | OnVisitEmptyNode (EmptyNode &node) override |
Validate that an expression is properly written by returning any error attached to the nodes during parsing.
|
inline |
Get all the errors.
No errors means that the expression is valid.
|
inline |
Get only the fatal errors.
Expressions with fatal error can't be generated.