Ejemplo n.º 1
0
 /// <summary>
 /// accessor: accessor_name '[' accessor_key ']'; 
 /// </summary>
 /// <param name="node"></param>
 /// <param name="element"></param>
 /// <returns></returns>
 private INode Accessor(PegNode node, Element element)
 {
     var ident = node.GetAsString(Src);
     var key = node.next_.GetAsString(Src).Replace("'", "");
     var el = element.NearestAs<Element>(ident);
     if (el!=null)
     {
         var prop = el.GetAs<Property>(key);
         if (((INode)prop) != null) return prop.Value;
     }
     return new Anonymous("");
 }