Exemplo n.º 1
0
        static void getChildren(string source, ref int index, Values.XML xml)
        {
            Parser parser = new XMLParser();

            while (parser.Scan(source, index))
            {
                xml.AddChild((Values.XML)parser.Result.Value);
                index = parser.Result.Position;
            }

            var matcher = new Matcher();

            if (matcher.IsMatch(source.Substring(index), @"^\s*<%%"))
            {
                var openLength = matcher[0].Length;
                Color(index, openLength, IDEColor.EntityType.Structure);
                index       += openLength;
                xml.Children = OrangeCompiler.Block(source, ref index, "%>");
            }

            parser = new IndirectXMLParser();
            while (parser.Scan(source, index))
            {
                xml.AddChild((Values.XML)parser.Result.Value);
                index = parser.Result.Position;
            }
        }