コード例 #1
0
        /// <summary>
        /// Adds a function to the top-level element.
        /// </summary>
        /// <param name="objectName">Name of the object.</param>
        /// <param name="returnType">Type of the return.</param>
        /// <param name="function">The function.</param>
        /// <returns></returns>
        public CodeFunction AddFunction(string objectName, LuaDeclaredType returnType, FunctionDeclaration function)
        {
            CodeFunction codeFunction = RootElement.AddFunction(objectName, vsCMFunction.vsCMFunctionFunction,
                                                                returnType, Missing.Value,
                                                                vsCMAccess.vsCMAccessPublic, function);

            return(codeFunction);
        }