private void HandleId(Token token, int type, int len = -1, int assign = -1) { ID id = new ID(token.src, ID.GetCount(), type, len, assign); Global.idTable.Add(token.src, id); }
private void HandleId(Token token, int type, int len = -1, int assign = -1) { if (Global.idTable.ContainsKey(token.src)) { ++errNum; errStr += "line " + token.lineNum + " : \t变量 \"" + token.src + "\" 重复定义\r\n"; return; } ID id = new ID(token.src, ID.GetCount(), type, len, assign); Global.idTable.Add(token.src, id); //ID.RefreshCount(len); }