AGS.Editor.ScintillaWrapper.AddFunctionParametersToVariableList C# (CSharp) Метод

AddFunctionParametersToVariableList() приватный Метод

private AddFunctionParametersToVariableList ( ScriptFunction func, List variables ) : void
func ScriptFunction
variables List
Результат void
        private void AddFunctionParametersToVariableList(ScriptFunction func, List<ScriptVariable> variables)
        {
            if (func.ParamList.Length == 0)
            {
                return;
            }
            string[] parameters = func.ParamList.Split(',');
            foreach (string thisParam in parameters)
            {
                string param = thisParam.Trim();
                if (param.StartsWith("optional "))
                {
                    param = param.Substring(9).Trim();
                }
                int index = param.Length - 1;
                while ((index >= 0) &&
                       (Char.IsLetterOrDigit(param[index]) || param[index] == '_'))
                {
                    index--;
                }
                string paramName = param.Substring(index + 1);
                string paramType = param.Substring(0, index + 1).Trim();
                bool isPointer = false;
                if (paramType.EndsWith("*"))
                {
                    isPointer = true;
                    paramType = paramType.Substring(0, paramType.Length - 1).Trim();
                }
                if ((paramName.Length > 0) && (paramType.Length > 0))
                {
                    variables.Add(new ScriptVariable(paramName, paramType, false, isPointer, null, null, false, false, false, false, func.StartsAtCharacterIndex));
                }
            }
        }
ScintillaWrapper