Exemplo n.º 1
0
        //--- impl board creation

        internal PositionValue GetPosition(string name)
        {
            var position = PositionValue.Create(name);

            SetPosition(position);
            return(position);
        }
Exemplo n.º 2
0
 // 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);
             }
         }
     }
 }
Exemplo n.º 3
0
 protected PositionValue DefPosition(IdentNode node)
 {
     return(DefSymbolValue(node, PositionValue.Create(node.Name)) as PositionValue);
 }