//--- impl board creation internal PositionValue GetPosition(string name) { var position = PositionValue.Create(name); SetPosition(position); return(position); }
// recursively add symbols void AddPositions(int index, string prefix, IList <string> dims) { foreach (var frag in dims[index].Split('/')) { var name = prefix + frag; if (index + 1 < dims.Count) { AddPositions(index + 1, name, dims); } else { var sym = Symbols.Find(name); if (sym == null) { Symbols.DefineValue(name, PositionValue.Create(name)); } else if (!(sym.Kind == SymKinds.VALUE && sym.DataType == DataTypes.Position)) { _currentparser.Syntax("cannot define {0} as position", name); } } } }
protected PositionValue DefPosition(IdentNode node) { return(DefSymbolValue(node, PositionValue.Create(node.Name)) as PositionValue); }