There is a bug where the true and false will not be parsed correctly as it will be treated as an expression variable instead.
Solution: Add true and false to the exclusion list.
private static bool ValidIdentifier(string aExpression)
{
aExpression = aExpression.Trim();
if (string.IsNullOrEmpty(aExpression))
return false;
if (aExpression.Length < 1)
return false;
if (aExpression.Contains(" "))
return false;
if(aExpression == "true" || aExpression == "false")
return false;
char firstLetter = char.ToLower(aExpression[0]);
if (firstLetter != '_' && (firstLetter < 'a' || firstLetter > 'z'))
return false;
return true;
}