public virtual NodeValue Concat(NodeValue other) { if(other == null) return this; return new CompoundNodeValue(Enumerations.Combine(Terminals, other.Terminals)); }
public static NodeValue Concat(NodeValue a, NodeValue b) { return a == null ? b : b is NullNodeValue ? b : a.Concat(b); }
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(); }
public override NodeValue Concat(NodeValue other) { if(other is StaticNodeValue) return new StaticNodeValue(Value + ((StaticNodeValue)other).Value); else return base.Concat(other); }
public override NodeValue Concat(NodeValue other) { return this; }
public TextContext(NodeContext parent, TextNode node) : base(parent, node) { val = new StaticNodeValue(((TextNode)Node).Value); }