public bool TryGetFunction(string functionName, out bool isUserFunction, out FunctionHandler retHandler)
        {
            //First, check user functions to see if function with name exists
            if(userFunctions.Contains(functionName))
            {
                retHandler = new UserFunctionHandler();
                isUserFunction = true;
                return true;
            }

            //Then, check system functions to see if function exists
            if (this.systemFunctions.TryGetValue(functionName, out FunctionHandler systemFunction))
            {
                retHandler = systemFunction;
                isUserFunction = false;
                return true;
            }

            //Finally, check if function has been overridden, if it has a '_' at the front ('_' prefixed function
            if(functionName.StartsWith("_") && 
                this.systemFunctions.TryGetValue(functionName.Substring(1), out FunctionHandler overridenFunction))
            {
                retHandler = overridenFunction;
                isUserFunction = false;
                return true;
            }

            retHandler = null;
            isUserFunction = false;
            return false;
        }
        public static void HandleAliasNode(TreeWalker walker, FunctionNode function, bool isNumAlias)
        {
            List<Node> arguments = function.GetArguments(2);

            string aliasName = FunctionHandler.VerifyType<AliasNode>(arguments[0]).aliasName;

            string aliasValue = walker.TranslateExpression(arguments[1]);

            Log.Information($"Received numalias {aliasName} = {aliasValue}");

            //string mangledAliasName = isNumAlias ? MangleNumalias(aliasName) : MangleStralias(aliasName);
            string mangledAliasName = MangleAlias(aliasName);
            walker.scriptBuilder.EmitPython($"{mangledAliasName} = {aliasValue}");

            if(isNumAlias)
            {
                walker.numAliasDictionary.Set(aliasName, 0);
            }
            else
            {
                walker.stringAliasDictionary.Set(aliasName, 0);
            }

        }
 private void RegisterFunctionWithCheck(IgnoreCaseDictionary<FunctionHandler> dict, FunctionHandler userFunctionHandler)
 {
     foreach (string function_name in userFunctionHandler.FunctionNames())
     {
         if (dict.Contains(function_name))
         {
             throw new Exception($"User function {function_name} was defined twice");
         }
         else
         {
             dict.Set(function_name, userFunctionHandler);
         }
     }
 }
 public void RegisterSystemFunction(FunctionHandler systemFunctionHandler)
 {
     RegisterFunctionWithCheck(systemFunctions, systemFunctionHandler);
 }