Exemplo n.º 1
0
        // take a list of headed nodes and return as a dictionary
        // note: key is name of head ident
        internal static Dictionary <string, List <List <Node> > > GetDict(IList <Node> nn)
        {
            var dict = new Dictionary <string, List <List <Node> > >();

            foreach (var n in nn)
            {
                NodeListParser nlp = NodeListParser.Create(n);
                //dict.AddMulti(nlp.Current.AsIdent.Ident, nlp.Nodes.ToList()); // breaking!!!
                dict.AddMulti(nlp.GetIdent().Name, nlp.GetTail().ToList());
            }
            return(dict);
        }