示例#1
0
        // ** ctor
        public Token(object value, TKID id, TKTYPE type)
        {
            Value = value;
            ID    = id;
            Type  = type;
            double d;

            if (value is double)
            {
                d = (double)value;
                string sd = d.ToString();
                sd       = sd.Substring(sd.ToString().IndexOf(System.Globalization.NumberFormatInfo.CurrentInfo.NumberDecimalSeparator) + 1);
                decimals = sd.Length;
            }
        }
示例#2
0
        private void AddToken(object symbol, TKID id, TKTYPE type)
        {
            var token = new Token(symbol, id, type);

            _tkTbl.Add(symbol, token);
        }
示例#3
0
 // ** ctor
 public Token(object value, TKID id, TKTYPE type)
 {
     Value = value;
     ID    = id;
     Type  = type;
 }
示例#4
0
 void AddToken(object symbol, TKID id, TKTYPE type)
 {
     var token = new Token(symbol, id, type);
     _tkTbl.Add(symbol, token);
 }
示例#5
0
 // ** ctor
 public Token(object value, TKID id, TKTYPE type)
 {
     Value = value;
     ID = id;
     Type = type;
 }