Esempio n. 1
0
        public virtual NodeValue Concat(NodeValue other)
        {
            if(other == null)
                return this;

            return new CompoundNodeValue(Enumerations.Combine(Terminals, other.Terminals));
        }
Esempio n. 2
0
 public static NodeValue Concat(NodeValue a, NodeValue b)
 {
     return
         a == null ? b :
         b is NullNodeValue ? b :
         a.Concat(b);
 }
Esempio n. 3
0
        public FileValueContext(NodeContext parent, FileValueNode node)
            : base(parent, node)
        {
            KeyValuePair<string, string> splitName = FileValues.SplitName(((FileValueNode)Node).Value);

            IFileValues fileValues = null;
            if(!Root.GetShared<FileValueShared>().FileValues.TryGetValue(splitName.Key, out fileValues))
                throw new ApplicationException("FileValues not found: " + splitName.Key);

            val = fileValues.Get(splitName.Value) ?? new NullNodeValue();
        }
Esempio n. 4
0
 public override NodeValue Concat(NodeValue other)
 {
     if(other is StaticNodeValue)
         return new StaticNodeValue(Value + ((StaticNodeValue)other).Value);
     else
         return base.Concat(other);
 }
Esempio n. 5
0
 public override NodeValue Concat(NodeValue other)
 {
     return this;
 }
Esempio n. 6
0
 public TextContext(NodeContext parent, TextNode node)
     : base(parent, node)
 {
     val = new StaticNodeValue(((TextNode)Node).Value);
 }