Пример #1
0
 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;
     }
 }
Пример #2
0
 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;
     }
 }
Пример #3
0
        private static IDictionary GetOpTable(IokeParser parser, IokeObject opTable, string name, OpTableCreator creator)
        {
            IokeObject operators = IokeObject.As(IokeObject.FindCell(opTable, 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);
            }
        }