Example #1
0
 public ushort this[Symbol sym]
 {
     get
     {
         return _lookup[sym];
     }
 }
Example #2
0
        public ushort AddSymbol(Symbol s)
        {
            if (_lookup.ContainsKey(s))
            {
                return _lookup[s];
            }

            _store.Add(s);
            ushort idx = (ushort)(_store.Count - 1);
            _lookup.Add(s, idx);
            return idx;
        }