public EntityDef InternEntityDef(Token token, Expression atomTypeExpr) { string key = token.ToString(); EntityDef entityDef; if (!EntityDictionary.TryGetValue(key, out entityDef)) { entityDef = new EntityDef(token); entityDef.AtomTypeExpr = atomTypeExpr; EntityDictionary.Add(key, entityDef); } return(entityDef); }
public void AddEntityDef(EntityDef entityDef) { EntityDictionary[entityDef.Token.ToString()] = entityDef; }