private void WriteFunction(ArmBuiltinFunction function)
        {
            Write("function ");
            Write(function.Name);
            OpenBlock();

            WriteParameterCheck(function.MinimumArguments, function.MaximumArguments);
            Write("RawCall ");
            Write(function.Name);
            Write(" -Arguments ");
            Write("$args");

            CloseBlock();
        }
Beispiel #2
0
        public Dictionary <string, ArmBuiltinFunction> ParseFromJToken(JToken functionSpecDocument)
        {
            var functions = new Dictionary <string, ArmBuiltinFunction>(StringComparer.OrdinalIgnoreCase);

            var signatureArray = (JArray)((JObject)functionSpecDocument)["functionSignatures"];

            foreach (JObject entry in signatureArray)
            {
                ArmBuiltinFunction function = ConvertFromJObject(entry);
                functions[function.Name] = function;
            }

            return(functions);
        }