From: Juerg Billeter Date: Fri, 18 Jan 2008 22:00:34 +0000 (+0000) Subject: support nested generic types, fixes bug 443522 X-Git-Tag: VALA_0_1_6~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a980f1c90cfca1b9b83b9032edfc35ae9d0c7efa;p=platform%2Fupstream%2Fvala.git support nested generic types, fixes bug 443522 2008-01-18 Juerg Billeter * vala/scanner.l: support nested generic types, fixes bug 443522 svn path=/trunk/; revision=859 --- diff --git a/ChangeLog b/ChangeLog index 7d555fa..474073d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-01-18 Jürg Billeter + * vala/scanner.l: support nested generic types, fixes bug 443522 + +2008-01-18 Jürg Billeter + * vala/valavoidtype.vala: implement get_cname method * gobject/valaccodegenerator.vala: cast function pointers to callback diff --git a/vala/scanner.l b/vala/scanner.l index de804da..a38a57b 100644 --- a/vala/scanner.l +++ b/vala/scanner.l @@ -63,6 +63,9 @@ string_literal \"{string_literal_character}*\" integer_literal ({decimal_integer_literal}|{hexadecimal_integer_literal}|{octal_integer_literal}){integer_suffix}? literal ({integer_literal}|{real_literal}|{character_literal}|{string_literal}) +type_name ("weak"{space})?({ident}".")?{ident} +generic_type {type_name}("<"{space}{type_name}("?"|"*"+)?(","{space}{type_name}("?"|"*"+)?)*">")?("?"|"*"+)? + %% "/*" { uploc; file_comment = (yylineno == 1); BEGIN (IN_COMMENT); } @@ -110,7 +113,7 @@ literal ({integer_literal}|{real_literal}|{character_literal}|{string_literal "<=" { uploc; return OP_LE; } ">=" { uploc; return OP_GE; } "=>" { uploc; return LAMBDA; } -"<"{space}("weak"{space})?({ident}".")?{ident}("?"|"*"+)?("[]""?"?)?(","{space}("weak"{space})?({ident}".")?{ident}("?"|"*"+)?("[]""?"?)?)*">" { yyless (1); uploc; return GENERIC_LT; } +"<"{space}{generic_type}{space}(","{space}{generic_type}{space})*">" { yyless (1); uploc; return GENERIC_LT; } "<" { uploc; return OP_LT; } ">" { uploc; return OP_GT; } "!" { uploc; return OP_NEG; }