• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# Expression.ExpressionMediator类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中MinorShift.Emuera.GameData.Expression.ExpressionMediator的典型用法代码示例。如果您正苦于以下问题:C# ExpressionMediator类的具体用法?C# ExpressionMediator怎么用?C# ExpressionMediator使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ExpressionMediator类属于MinorShift.Emuera.GameData.Expression命名空间,在下文中一共展示了ExpressionMediator类的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: GetReturnValue

 public virtual SingleTerm GetReturnValue(ExpressionMediator exm, IOperandTerm[] arguments)
 {
     if (ReturnType == typeof(Int64))
         return new SingleTerm(GetIntValue(exm, arguments));
     else
         return new SingleTerm(GetStrValue(exm, arguments));
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:7,代码来源:FunctionMethod.cs


示例2: GetStrValue

 public override string GetStrValue(ExpressionMediator exm)
 {
     SingleTerm term = exm.Process.GetValue(this);
     if (term == null)
         return "";
     return term.Str;
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:7,代码来源:UserDefinedMethodTerm.cs


示例3: GetIntValue

 public override long GetIntValue(ExpressionMediator exm)
 {
     SingleTerm term = exm.Process.GetValue(this);
     if (term == null)
         return 0;
     return term.Int;
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:7,代码来源:UserDefinedMethodTerm.cs


示例4: GetValue

 public virtual SingleTerm GetValue(ExpressionMediator exm)
 {
     if (type == typeof(Int64))
         return new SingleTerm(0);
     else
         return new SingleTerm("");
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:7,代码来源:IOperandTerm.cs


示例5: GetStrValue

 public override string GetStrValue(ExpressionMediator exm, IOperandTerm[] arguments)
 {
     string str = arguments[0].GetStrValue(exm);
     Int64 pos = arguments[1].GetIntValue(exm);
     if (pos < 0 || pos >= str.Length)
         return "";
     return str[(int)pos].ToString();
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:8,代码来源:Creator.Method.cs


示例6: Restructure

 public override IOperandTerm Restructure(ExpressionMediator exm)
 {
     if (dic == null)
         dic = exm.VEvaluator.Constant.GetKeywordDictionary(out errPos, parentCode, index);
     strTerm = strTerm.Restructure(exm);
     if (!(strTerm is SingleTerm))
         return this;
     return new SingleTerm(this.GetIntValue(exm));
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:9,代码来源:VariableStrArgTerm.cs


示例7: GetBool

 public bool GetBool(Int64 Is, ExpressionMediator exm)
 {
     if (CaseType == CaseExpressionType.To)
         return LeftTerm.GetIntValue(exm) <= Is && Is <= RightTerm.GetIntValue(exm);
     if (CaseType == CaseExpressionType.Is)
     {
         IOperandTerm term = OperatorMethodManager.ReduceBinaryTerm(Operator, new SingleTerm(Is), LeftTerm);
         return term.GetIntValue(exm) != 0;
     }
     return LeftTerm.GetIntValue(exm) == Is;
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:11,代码来源:CaseExpression.cs


示例8: GetValue

 public override SingleTerm GetValue(ExpressionMediator exm)
 {
     SingleTerm term =  exm.Process.GetValue(this);
     if (term == null)
     {
         if (GetOperandType() == typeof(Int64))
             return new SingleTerm(0);
         else
             return new SingleTerm("");
     }
     return term;
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:12,代码来源:UserDefinedMethodTerm.cs


示例9: GetIntValue

 public override Int64 GetIntValue(ExpressionMediator exm)
 {
     try
     {
         return Identifier.GetIntValue(exm, transporter);
     }
     catch(Exception e)
     {
         if ((e is IndexOutOfRangeException) || (e is ArgumentOutOfRangeException) || (e is OverflowException))
             Identifier.CheckElement(transporter);
         throw e;
     }
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:13,代码来源:VariableTerm.cs


示例10: DoInstruction

 public override void DoInstruction(ExpressionMediator exm, InstructionLine func, ProcessState state)
 {
     ExpressionArrayArgument intExpArg = (ExpressionArrayArgument)func.Argument;
     Int64 integer = -1;
     foreach (IOperandTerm int64Term in intExpArg.TermList)
     {
         integer = int64Term.GetIntValue(exm);
         if(isDel)
             exm.VEvaluator.DelCharacter(integer);
         else
             exm.VEvaluator.AddCharacter(integer, isSp);
     }
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:13,代码来源:Instraction.Child.cs


示例11: checkArgumentType

 protected bool checkArgumentType(InstructionLine line, ExpressionMediator exm, IOperandTerm[] arguments)
 {
     if (arguments == null)
     {
         warn("引数がありません", line, 2, false);
         return false;
     }
     if ( arguments.Length < minArg ||
         ((arguments.Length < argumentTypeArray.Length) && (minArg < 0)) )
     {
         warn("引数が足りません", line, 2, false);
         return false;
     }
     int length = arguments.Length;
     if ((arguments.Length > argumentTypeArray.Length)&&(!argAny))
     {
         warn("引数が多すぎます", line, 1, false);
         length = argumentTypeArray.Length;
     }
     for (int i = 0; i < length; i++)
     {
         Type allowType;
         if ((!argAny) && (argumentTypeArray[i] == null))
             continue;
         else if (argAny && i >= argumentTypeArray.Length)
             allowType = argumentTypeArray[argumentTypeArray.Length - 1];
         else
             allowType = argumentTypeArray[i];
         if (arguments[i] == null)
         {
             if (allowType == null)
                 continue;
             warn("第" + (i + 1).ToString() + "引数を認識できません", line, 2, false);
             return false;
         }
         if ((allowType != typeof(void)) && (allowType != arguments[i].GetOperandType()))
         {
             warn("第" + (i + 1).ToString() + "引数の型が正しくありません", line, 2, false);
             return false;
         }
     }
     length = arguments.Length;
     for (int i = 0; i < length; i++)
     {
         if (arguments[i] == null)
             continue;
         arguments[i] = arguments[i].Restructure(exm);
     }
     return true;
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:50,代码来源:ArgumentBuilder.cs


示例12: GetStrValue

 public override string GetStrValue(ExpressionMediator exm)
 {
     try
     {
         string ret = Identifier.GetStrValue(exm, transporter);
         if (ret == null)
             return "";
         return ret;
     }
     catch(Exception e)
     {
         if ((e is IndexOutOfRangeException) || (e is ArgumentOutOfRangeException) || (e is OverflowException))
             Identifier.CheckElement(transporter);
         throw e;
     }
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:16,代码来源:VariableTerm.cs


示例13: GetIntValue

 public override Int64 GetIntValue(ExpressionMediator exm)
 {
     if (dic == null)
         dic = exm.VEvaluator.Constant.GetKeywordDictionary(out errPos, parentCode, index);
     string key = strTerm.GetStrValue(exm);
     if (key == "")
         throw new CodeEE("キーワードを空には出来ません");
     int i;
     if (!dic.TryGetValue(key, out i))
     {
         if (errPos == null)
             throw new CodeEE("配列変数" + parentCode.ToString() + "の要素を文字列で指定することはできません");
         else
             throw new CodeEE(errPos + "の中に\"" + key + "\"の定義がありません");
     }
     return i;
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:17,代码来源:VariableStrArgTerm.cs


示例14: Restructure

 public override IOperandTerm Restructure(ExpressionMediator exm)
 {
     if (method.HasUniqueRestructure)
     {
         if (method.UniqueRestructure(exm, arguments) && method.CanRestructure)
             return GetValue(exm);
         return this;
     }
     bool argIsConst = true;
     for(int i = 0; i< arguments.Length;i++)
     {
         if(arguments[i] == null)
             continue;
         arguments[i] = arguments[i].Restructure(exm);
         argIsConst &= arguments[i] is SingleTerm;
     }
     if ((method.CanRestructure) && (argIsConst))
         return GetValue(exm);
     return this;
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:20,代码来源:FunctionMethodTerm.cs


示例15: CreateArgument

 public virtual Argument CreateArgument(InstructionLine line, ExpressionMediator exm)
 {
     throw new ExeEE("実装されていない");
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:4,代码来源:Instruction.cs


示例16: Reduce

 public void Reduce(ExpressionMediator exm)
 {
     LeftTerm = LeftTerm.Restructure(exm);
     if (CaseType == CaseExpressionType.To)
         RightTerm = RightTerm.Restructure(exm);
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:6,代码来源:CaseExpression.cs


示例17: DoInstruction

 public virtual void DoInstruction(ExpressionMediator exm, InstructionLine func, ProcessState state)
 {
     throw new ExeEE("未実装 or 呼び出しミス");
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:4,代码来源:Instruction.cs


示例18: Reset

 public static void Reset()
 {
     Process = null;
     ConstantData = null;
     GameBaseData = null;
     EMediator = null;
     VEvaluator = null;
     VariableData = null;
     Console = null;
     MainWindow = null;
     LabelDictionary = null;
     IdentifierDictionary = null;
     tempDic.Clear();
 }
开发者ID:utau1116b,项目名称:Hello-World,代码行数:14,代码来源:GlobalStatic.cs



注:本文中的MinorShift.Emuera.GameData.Expression.ExpressionMediator类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Expression.IOperandTerm类代码示例发布时间:2022-05-26
下一篇:
C# MiniHttpd.HttpRequest类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap