allow \ in function types

I looked at all the other uses of ##ident## and I think they are correct to not allow namespaces but we'll see.
Esse commit está contido em:
Paul Tarjan
2013-05-09 11:57:06 -07:00
commit de Sara Golemon
commit 2f023e66db
14 arquivos alterados com 1556 adições e 1536 exclusões
Diferenças do arquivo suprimidas por serem muito extensas Carregar Diff
+13 -9
Ver Arquivo
@@ -2392,14 +2392,18 @@ sm_opt_return_type:
;
sm_typevar_list:
ident ',' sm_typevar_list { _p->addTypeVar($1.text()); }
| ident { _p->addTypeVar($1.text()); }
| ident T_AS sm_shape_type
sm_typevar_list
| ident T_AS ident ','
sm_typevar_list { _p->addTypeVar($1.text()); }
| ident T_AS ident { _p->addTypeVar($1.text()); }
| ident T_AS sm_shape_type
namespace_string ','
sm_typevar_list { _p->addTypeVar($1.text()); }
| namespace_string { _p->addTypeVar($1.text()); }
| namespace_string T_AS
sm_shape_type sm_typevar_list
| namespace_string T_AS
namespace_string ','
sm_typevar_list { _p->addTypeVar($1.text()); }
| namespace_string T_AS
namespace_string { _p->addTypeVar($1.text()); }
| namespace_string T_AS
sm_shape_type
;
sm_shape_member_type:
@@ -2436,7 +2440,7 @@ sm_type:
| '@' sm_type { only_in_strict_mode(_p);
_p->onTypeSpecialization($2, '@');
$$ = $2; }
| ident sm_typeargs_opt { _p->onTypeAnnotation($$, $1, $2); }
| namespace_string sm_typeargs_opt { _p->onTypeAnnotation($$, $1, $2); }
| T_ARRAY { Token t; t.reset();
$1.setText("array");
_p->onTypeAnnotation($$, $1, t); }