X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=lib%2Fas3%2Fparser.y;h=600c54c28a5c1ffe705d5b7b74d5e9ca6ef9d131;hb=fa119fe1bbdbeb404f804ec83b1ae055404ff482;hp=06b5a4fe2ba56aca9e00a8248aba22716fe79e16;hpb=c1b77b2459e0b8687428e6f4932797b869caace1;p=swftools.git diff --git a/lib/as3/parser.y b/lib/as3/parser.y index 06b5a4f..600c54c 100644 --- a/lib/as3/parser.y +++ b/lib/as3/parser.y @@ -243,7 +243,7 @@ extern int a3_lex(); %left new2 %left '[' ']' "new" '{' "{ (dictionary)" '.' ".." "::" '@' -%nonassoc T_IDENTIFIER +%left T_IDENTIFIER %left above_identifier %left below_else %nonassoc "else" @@ -1363,7 +1363,9 @@ code_t*converttype(code_t*c, classinfo_t*from, classinfo_t*to) return c; if(TYPE_IS_NULL(from) && !IS_NUMBER_OR_INT(to)) return c; - syntaxerror("can't convert type %s to %s", from->name, to->name); + syntaxerror("can't convert type %s%s%s to %s%s%s", + from->package, from->package?".":"", from->name, + to->package, to->package?".":"", to->name); return 0; // make gcc happy } @@ -1899,6 +1901,8 @@ FOR_INIT : VARIABLE_DECLARATION FOR_INIT : VOIDEXPRESSION // TODO: why doesn't an %prec above_identifier resolve the r-r conflict here? +// (I don't see any easy way to revolve this conflict otherwise, as we +// can't touch VAR_READ without upsetting the precedence about "return") FOR_IN_INIT : "var" T_IDENTIFIER MAYBETYPE { $$=$2;new_variable($2,$3,1); }