/// <summary> /// Define a new primitive language operator for this language /// </summary> /// <param name="opName">The operator name</param> /// <param name="opSymbolString">The operator symbol</param> /// <returns></returns> public OperatorPrimitive DefineLanguageOperatorPrimitive(string opName, string opSymbolString) { if (OperatorPrimitiveDictionary.ContainsKey(opName)) { return(OperatorPrimitiveDictionary[opName]); } var newOp = OperatorPrimitive.Create(opName, opSymbolString); OperatorPrimitiveDictionary.Add(opName, newOp); return(newOp); }
/// <summary> /// Define a new primitive language operator for this language /// </summary> /// <param name="opName">The operator name</param> /// <returns></returns> public OperatorPrimitive DefineLanguageOperatorPrimitive(string opName) { if (OperatorPrimitiveDictionary.ContainsKey(opName)) { return(OperatorPrimitiveDictionary[opName]); } var newOp = OperatorPrimitive.Create(opName); OperatorPrimitiveDictionary.Add(opName, newOp); //if (EnableLogger) // _Logger.AddFullLine("Defining language role " + new_op.OperatorName); return(newOp); }