Can parse whole program in CastleScript language, is also prepared to parse only a single expression (usefull for cases when I need to input only a mathematical expression, like for glplotter function expression).
Creates and returns instance of TCasScriptExpression, that represents parsed tree of expression in S.
This parses a subset of CastleScript language, that allows you to define only one expression without any assignments. Also the end result is always casted to the float() type (just like it would be wrapped inside float() function call — in fact this is exactly what happens.)
contains a list of named values you want to allow in this expression.
Important: They will all have OwnedByParentExpression set to False, and you will have to free them yourself. That's because given expression may use the same variable more than once (so freeing it twice would cause bugs), or not use it at all (so it will be automatically freed at all).
So setting OwnedByParentExpression and freeing it yourself is the only sensible thing to do.
function ParseConstantFloatExpression(const S: string): Float;
Parse constant float expression. This can be used as a great replacement for StrToFloat. Takes a string with any constant mathematical expression, according to CastleScript syntax, parses it and calculates.