Exemplo n.º 1
0
 public override HassiumList ToList(VirtualMachine vm, params HassiumObject[] args)
 {
     HassiumChar[] chars = new HassiumChar[String.Length];
     for (int i = 0; i < chars.Length; i++)
         chars[i] = new HassiumChar(String[i]);
     return new HassiumList(chars);
 }
Exemplo n.º 2
0
 public void Accept(CharNode node)
 {
     var ch = new HassiumChar(node.Char);
     if (!module.ObjectPool.ContainsKey(ch.GetHashCode()))
         module.ObjectPool.Add(ch.GetHashCode(), ch);
     method.Emit(node.SourceLocation, InstructionType.PushObject, ch.GetHashCode());
 }