GDevelop Core
Core library for developing platforms and tools compatible with GDevelop.
Functions
gd::GrammarTerminals Namespace Reference

Functions

bool IsWhitespace (gd::String::value_type character)
 
bool IsParameterSeparator (gd::String::value_type character)
 
bool IsDot (gd::String::value_type character)
 
bool IsQuote (gd::String::value_type character)
 
bool IsBracket (gd::String::value_type character)
 
bool IsOpeningParenthesis (gd::String::value_type character)
 
bool IsClosingParenthesis (gd::String::value_type character)
 
bool IsOpeningSquareBracket (gd::String::value_type character)
 
bool IsClosingSquareBracket (gd::String::value_type character)
 
bool IsExpressionEndingChar (gd::String::value_type character)
 
bool IsExpressionOperator (gd::String::value_type character)
 
bool IsUnaryOperator (gd::String::value_type character)
 
bool IsTermOperator (gd::String::value_type character)
 
bool IsNumberFirstChar (gd::String::value_type character)
 
bool IsNonZeroDigit (gd::String::value_type character)
 
bool IsZeroDigit (gd::String::value_type character)
 
bool IsAdditionalReservedCharacter (gd::String::value_type character)
 
bool IsAllowedInIdentifier (gd::String::value_type character)
 

Detailed Description

Contains functions to handle the grammar of the expressions accepted by GDevelop.

Function Documentation

◆ IsAllowedInIdentifier()

bool gd::GrammarTerminals::IsAllowedInIdentifier ( gd::String::value_type  character)
inline

Check if the given character can be used in an identifier. This is any unicode character, except for: ‘, . " () [] {} + - < > ? ^ = \ : ! / * ~ ’ % # @ | & $ ;` and backtick and whitespaces (space, line break, carriage return).

This is loosely based on what is allowed in languages like JavaScript (see https://mathiasbynens.be/notes/javascript-properties), without support for unicode escape syntax, and allowing all unicode ranges. The only disallowed characters are the one used for the grammar.