comparison parser/Parser.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 01c2c49775ef
comparison
equal deleted inserted replaced
159:a2d9121d6dff 160:6cb2f4201e2a
704 704
705 Decl parseVarDecl() 705 Decl parseVarDecl()
706 { 706 {
707 // manually hardcoded to only support "type id [= exp];" 707 // manually hardcoded to only support "type id [= exp];"
708 // as that is the only thing the codegen understands 708 // as that is the only thing the codegen understands
709 Id type = parseType; 709 Id type = parseType();
710 Id id = Id(next()); 710 Id id = Id(next());
711 Exp init; 711 Exp init;
712 if (skip(Tok.Assign)) 712 if (skip(Tok.Assign))
713 init = parseExpression(); 713 init = parseExpression();
714 require(Tok.Seperator); 714 require(Tok.Seperator);