当前位置: 首页>>代码示例>>C#>>正文


C# IokeObject.FindCell方法代码示例

本文整理汇总了C#中Ioke.Lang.IokeObject.FindCell方法的典型用法代码示例。如果您正苦于以下问题:C# IokeObject.FindCell方法的具体用法?C# IokeObject.FindCell怎么用?C# IokeObject.FindCell使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Ioke.Lang.IokeObject的用法示例。


在下文中一共展示了IokeObject.FindCell方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Activate

 public virtual object Activate(IokeObject self, IokeObject context, IokeObject message, object on)
 {
     object cell = self.FindCell(message, context, "activate");
     if(cell == context.runtime.nul) {
                        report(self, context, message, "activate");
         return context.runtime.nil;
     } else {
         IokeObject newMessage = Message.DeepCopy(message);
         newMessage.Arguments.Clear();
         newMessage.Arguments.Add(context.runtime.CreateMessage(Message.Wrap(context)));
         newMessage.Arguments.Add(context.runtime.CreateMessage(Message.Wrap(message)));
         newMessage.Arguments.Add(context.runtime.CreateMessage(Message.Wrap(IokeObject.As(on, context))));
         return IokeObject.GetOrActivate(cell, context, newMessage, self);
     }
 }
开发者ID:fronx,项目名称:ioke,代码行数:15,代码来源:IokeData.cs

示例2: GetOpTable

 private static IDictionary GetOpTable(IokeParser parser, IokeObject opTable, string name, OpTableCreator creator)
 {
     IokeObject operators = IokeObject.As(opTable.FindCell(parser.message, parser.context, name), null);
     if(operators != parser.runtime.nul && (IokeObject.dataOf(operators) is Dict)) {
         return Dict.GetMap(operators);
     } else {
         IDictionary result = creator.Create(parser.runtime);
         opTable.SetCell(name, parser.runtime.NewDict(result));
         return result;
     }
 }
开发者ID:nope,项目名称:ioke,代码行数:11,代码来源:Operators.cs

示例3: GetOpTable

 public IDictionary GetOpTable(IokeObject opTable, string name, OpTableCreator creator)
 {
     IokeObject operators = IokeObject.As(opTable.FindCell(_message, _context, name), null);
     if(operators != runtime.nul && (IokeObject.dataOf(operators) is Dict)) {
         return Dict.GetMap(operators);
     } else {
         var result = creator.Create(runtime);
         opTable.SetCell(name, runtime.NewDict(result));
         return result;
     }
 }
开发者ID:fronx,项目名称:ioke,代码行数:11,代码来源:Levels.cs

示例4: ToString

        public virtual string ToString(IokeObject self)
        {
            object obj = self.FindCell(null, null, "kind");
            int h = HashCode(self);
            string hash = System.Convert.ToString(h, 16).ToUpper();
            if(obj is NullObject) {
                return "#<nul:" + hash + ">";
            }

            string kind = ((Text)IokeObject.dataOf(obj)).GetText();
            return "#<" + kind + ":" + hash + ">";
        }
开发者ID:fronx,项目名称:ioke,代码行数:12,代码来源:IokeData.cs

示例5: Levels

        public Levels(IokeObject msg, IokeObject context, IokeObject message)
        {
            this.runtime = context.runtime;
            this._context = context;
            this._message = message;

            IokeObject opTable = IokeObject.As(msg.FindCell(_message, _context, "OperatorTable"), null);
            if(opTable == runtime.nul) {
                opTable = runtime.NewFromOrigin();
                opTable.Kind = "Message OperatorTable";
                runtime.Message.SetCell("OperatorTable", opTable);
                opTable.SetCell("precedenceLevelCount", runtime.NewNumber(OP_LEVEL_MAX));
            }

            this.operatorTable = GetOpTable(opTable, "operators", new BinaryOpTableCreator());
            this.trinaryOperatorTable = GetOpTable(opTable, "trinaryOperators", new TrinaryOpTableCreator());
            this.invertedOperatorTable = GetOpTable(opTable, "invertedOperators", new InvertedOpTableCreator());
            this.stack = new SaneList<Level>();
            this.Reset();
        }
开发者ID:fronx,项目名称:ioke,代码行数:20,代码来源:Levels.cs


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