// ** 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; } }
private void AddToken(object symbol, TKID id, TKTYPE type) { var token = new Token(symbol, id, type); _tkTbl.Add(symbol, token); }
// ** ctor public Token(object value, TKID id, TKTYPE type) { Value = value; ID = id; Type = type; }
void AddToken(object symbol, TKID id, TKTYPE type) { var token = new Token(symbol, id, type); _tkTbl.Add(symbol, token); }