comparison ast/Exp.d @ 160:6cb2f4201e2a

Improved static arrays Here is a list of some stuff that works char[3] s = "hey" char[3] s2 = s; s2[1] = 98 // no support for chars, but 98 = 'b' :) int[2] i; i[0] = 2; Still can't pass static arrays to functions
author Anders Halager <halager@gmail.com>
date Tue, 22 Jul 2008 13:29:20 +0200
parents 57b0b4464a0b
children 0f38f1a0f06f
comparison
equal deleted inserted replaced
159:a2d9121d6dff 160:6cb2f4201e2a
483 { 483 {
484 super(ExpType.StringExp, loc); 484 super(ExpType.StringExp, loc);
485 this.str = str; 485 this.str = str;
486 } 486 }
487 487
488 override DType type() { return null; } 488 override DType type() { return DType.Char.getAsStaticArray(data.length); }
489 489
490 char[] str; 490 char[] str;
491 ubyte[] data;
491 } 492 }
492 493
493 class NewExp : Exp 494 class NewExp : Exp
494 { 495 {
495 this(Identifier newType, Exp[] a_args, Exp[] c_args) 496 this(Identifier newType, Exp[] a_args, Exp[] c_args)