Commit 5f829317 authored by Jürg Billeter's avatar Jürg Billeter Committed by Jürg Billeter

support declaration of local multi-dimensional array variables

2008-03-08  Juerg Billeter  <j@bitron.ch>

	* vala/parser.y, vala/scanner.l: support declaration of local
	  multi-dimensional array variables

svn path=/trunk/; revision=1108
parent b8fad171
2008-03-08 Jürg Billeter <j@bitron.ch>
* vala/parser.y, vala/scanner.l: support declaration of local
multi-dimensional array variables
2008-03-08 Jürg Billeter <j@bitron.ch>
* vapigen/valagidlparser.vala: improve instance delegate detection
......
......@@ -106,6 +106,7 @@ static gboolean check_is_struct (ValaSymbol *symbol, ValaSourceReference *src);
%token OPEN_CAST_PARENS "cast ("
%token CLOSE_PARENS ")"
%token BRACKET_PAIR "[]"
%token OPEN_ARRAY_TYPE_BRACKET "array ["
%token OPEN_BRACKET "["
%token CLOSE_BRACKET "]"
%token ELLIPSIS "..."
......@@ -768,9 +769,9 @@ opt_bracket_pair
;
bracket_pair
: BRACKET_PAIR
: OPEN_ARRAY_TYPE_BRACKET opt_comma_list CLOSE_BRACKET
{
$$ = 1;
$$ = $2;
}
;
......
......@@ -81,7 +81,7 @@ generic_type {type_name}("<"{space}{type_name}("?"|"*"+)?(","{space}{type_name
"("({space}"weak")?{space}{ident}("."{ident})?("<"({ident}".")?{ident}(","({ident}".")?{ident})*">")?("["{space}"]")*{space}")"{space}("("|{ident}|{literal}) { yyless (1); uploc; return OPEN_CAST_PARENS; }
"(" { uploc; return OPEN_PARENS; }
")" { uploc; return CLOSE_PARENS; }
"[]" { uploc; return BRACKET_PAIR; }
"["{space}(","{space})*"]" { yyless (1); uploc; return OPEN_ARRAY_TYPE_BRACKET; }
"[" { uploc; return OPEN_BRACKET; }
"]" { uploc; return CLOSE_BRACKET; }
"..." { uploc; return ELLIPSIS; }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment