Function desc. Internal class - holder of function parameter names for calling script function from host.
Ejemplo n.º 1
0
        /// <summary>
        /// Register script function during parsing. For internal use.
        /// </summary>
        /// <param name="funcName">Function name.</param>
        /// <param name="pc">PC counter at script-s lexem stream.</param>
        /// <param name="paramList">Parameters list.</param>
        public void RegisterFunction(string funcName, int pc, List <string> paramList)
        {
            var desc = new FunctionDesc {
                Pc = pc - 1,
            };

            if (paramList.Count > 0)
            {
                desc.Params = paramList.ToArray();
            }
            _functions[funcName] = desc;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Register script function during parsing. For internal use.
 /// </summary>
 /// <param name="funcName">Function name.</param>
 /// <param name="pc">PC counter at script-s lexem stream.</param>
 /// <param name="paramList">Parameters list.</param>
 public void RegisterFunction(string funcName, int pc, List<string> paramList)
 {
     var desc = new FunctionDesc {
         PC = pc - 1,
     };
     if (paramList.Count > 0) {
         desc.Params = paramList.ToArray ();
     }
     _functions[funcName] = desc;
 }