summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/parser.mly
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-04-28 10:25:30 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-04-28 10:25:30 +0000
commite410bdf9bc71ddc2e3351d81dcfdf0d892660fa9 (patch)
treebbec2dbec041ab737eb0ab0184e0df66eee5057b /perl_checker.src/parser.mly
parent083865aa5545fdd98f0d5045888ae42fb2fbfc98 (diff)
downloadperl-MDK-Common-e410bdf9bc71ddc2e3351d81dcfdf0d892660fa9.tar
perl-MDK-Common-e410bdf9bc71ddc2e3351d81dcfdf0d892660fa9.tar.gz
perl-MDK-Common-e410bdf9bc71ddc2e3351d81dcfdf0d892660fa9.tar.bz2
perl-MDK-Common-e410bdf9bc71ddc2e3351d81dcfdf0d892660fa9.tar.xz
perl-MDK-Common-e410bdf9bc71ddc2e3351d81dcfdf0d892660fa9.zip
allow "sub pkg::foo() { ...}"
Diffstat (limited to 'perl_checker.src/parser.mly')
-rw-r--r--perl_checker.src/parser.mly4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl_checker.src/parser.mly b/perl_checker.src/parser.mly
index d2a8cc9..ed2095d 100644
--- a/perl_checker.src/parser.mly
+++ b/perl_checker.src/parser.mly
@@ -24,7 +24,7 @@
%token <(string option * string) Types.any_spaces_pos> SCALAR_IDENT ARRAY_IDENT HASH_IDENT FUNC_IDENT STAR_IDENT RAW_IDENT RAW_IDENT_PAREN ARRAYLEN_IDENT
%token <string Types.any_spaces_pos> SUB_WITH_PROTO
-%token <(string * string) Types.any_spaces_pos> FUNC_DECL_WITH_PROTO
+%token <(string option * string * string) Types.any_spaces_pos> FUNC_DECL_WITH_PROTO
%token <string Types.any_spaces_pos> FOR PRINT
%token <unit Types.any_spaces_pos> NEW FORMAT
@@ -181,7 +181,7 @@ use_revision:
func_decl:
| SUB word { new_esp M_none ($2.any, None) $1 $2}
-| FUNC_DECL_WITH_PROTO {new_1esp (Ident(None, fst $1.any, get_pos $1), Some (snd $1.any)) $1 }
+| FUNC_DECL_WITH_PROTO {new_1esp (Ident(fst3 $1.any, snd3 $1.any, get_pos $1), Some (ter3 $1.any)) $1 }
listexpr: /* Basic list expressions */
| %prec PREC_LOW { default_pesp P_tok []}