Пример #1
0
        void BuildFunction(XmlElement element)
        {
            PythonFunction pyFunc;

            Module.Functions.Add(pyFunc = new PythonFunction()
            {
                Name   = element.GetAttribute("name"),
                Region = GetDomRegion(element),
            });

            foreach (XmlElement child in element)
            {
                if (child.LocalName == "doc")
                {
                    pyFunc.Documentation = element.InnerText.Trim();
                }
                else if (child.LocalName == "local")
                {
                    BuildLocal(child, pyFunc);
                }
                else if (child.LocalName == "argument")
                {
                    BuildArgument(child, pyFunc);
                }
            }
        }
Пример #2
0
 void BuildLocal(XmlElement element, PythonFunction pyFunc)
 {
     pyFunc.Locals.Add(new PythonLocal()
     {
         Name   = element.GetAttribute("name"),
         Region = GetDomRegion(element)
     });
 }
Пример #3
0
 void BuildArgument(XmlElement element, PythonFunction pyFunc)
 {
     pyFunc.Arguments.Add(new PythonArgument()
     {
         Name   = element.GetAttribute("name"),
         Region = pyFunc.Region,
     });
 }
Пример #4
0
		void BuildFunction (XmlElement element, PythonClass pyClass)
		{
			PythonFunction pyFunc;

			pyClass.Functions.Add (pyFunc = new PythonFunction () {
				Name   = element.GetAttribute ("name"),
				Region = GetDomRegion (element),
			});

			foreach (XmlElement child in element)
				if (child.LocalName == "doc")
					pyFunc.Documentation = element.InnerText.Trim ();
				else if (child.LocalName == "argument")
					BuildArgument (child, pyFunc);
		}
Пример #5
0
		void BuildLocal (XmlElement element, PythonFunction pyFunc)
		{
			pyFunc.Locals.Add (new PythonLocal () {
				Name   = element.GetAttribute ("name"),
				Region = GetDomRegion (element)
			});
		}
Пример #6
0
		void BuildArgument (XmlElement element, PythonFunction pyFunc)
		{
			pyFunc.Arguments.Add (new PythonArgument () {
				Name       = element.GetAttribute("name"),
				Region     = pyFunc.Region,
			});
		}
Пример #7
0
		void BuildFunction (XmlElement element)
		{
			PythonFunction pyFunc;

			Module.Functions.Add (pyFunc = new PythonFunction () {
				Name   = element.GetAttribute ("name"),
				Region = GetDomRegion (element),
			});

			foreach (XmlElement child in element)
			{
				if (child.LocalName == "doc")
				{
					pyFunc.Documentation = element.InnerText.Trim ();
				}
				else if (child.LocalName == "local")
				{
					BuildLocal (child, pyFunc);
				}
				else if (child.LocalName == "argument")
				{
					BuildArgument (child, pyFunc);
				}
			}
		}