Exemple #1
0
        public void CompileExternalFunctionDecl(ExternalFunctionDecl extDecl)
        {
            if (extDecl.Attributes != null && extDecl.Attributes.Length > 0)
            {
                DumpAttributesList(extDecl.Attributes, true);
            }

            textWriter.Write("extern function {0}", SafeName(extDecl.Name));
            DumpParametersList(extDecl.Parameters);
            textWriter.WriteLine(";");
        }
        public void CompileExternalFunctionDecl(ExternalFunctionDecl extDecl)
        {
            XmlElement tmpElement = document.CreateElement("ExternalFunctionDecl");

            tmpElement.SetAttribute("Name", extDecl.Name);

            if (extDecl.Attributes != null && extDecl.Attributes.Length > 0)
            {
                ProcessAttributes(tmpElement, extDecl.Attributes);
            }

            XmlElement paramsElement = document.CreateElement("Parameters");

            ProcessParameters(paramsElement, extDecl.Parameters);
            tmpElement.AppendChild(paramsElement);

            currentElement.AppendChild(tmpElement);
        }