Constructors
Properties
Variables
#Methods
AddVariable
#AddVariableEx
#BalancedCharTest
#Test a string for balanced open and close chars. You can use this function to see if brackets or parenthesis have been properly used.
Parameters:
| str (string) | String to parse. |
| char_open (char) | Char that indicates an opening statement. |
| char_close (char) | Char that indicates a closing statement. |
| error_at (ref int) | The index at which the first error appears or -1 if no error was found. |
Returns: True if the chars are balanced, false if they are not.
CachedSymbols
#Retrieve a copy of the Queue of cached symbols. You can use the cached symbols as an uber-optimization to speed up successive calls to Evaluate() with an identical expression string
CacheSymbols
#Create a Symbols array from the expression. Use this method if you intend to evaluate the same expression multiple times. At this point, the expression has to be in correct syntax format. Use the GH_ExpressionSyntaxWriter.RewriteAll() method to make sure.
Parameters:
| Expression (string) |
Evaluate
#Evaluate the expression currently loaded in the Symbols cache using the currently loaded variables.
Evaluate
#Evaluate the expression queue without overriding any local caches. You can obtain an expression queue by calling CachedSymbols()
Parameters:
| qHint (Queue<GH_ParserSymbol>) |
Evaluate
#Store a new expression in the Symbols cache and evaluate it using the current variables
Parameters:
| expression (string) |
IsValidVariableName
#Tests whether a string is a valid variable name for expressions. Valid names must contain at least one character, must start with an alphabetic character, and only contain alphanumeric chars and underscores.
Parameters:
| name (string) | Name to test. |
Returns: True if the name is valid (might still conflict with a function name though), false if not.