diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-08-11 07:28:45 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-08-11 07:28:45 +0000 |
commit | 924739ea37144308b968db13b6302ed4e629a803 (patch) | |
tree | be3b4b74e64139ab4ae8d18c45c988783fcb9720 | |
parent | 9e5fec86804d9e5335c7ab04e8d00e4ebf501856 (diff) | |
download | perl-MDK-Common-924739ea37144308b968db13b6302ed4e629a803.tar perl-MDK-Common-924739ea37144308b968db13b6302ed4e629a803.tar.gz perl-MDK-Common-924739ea37144308b968db13b6302ed4e629a803.tar.bz2 perl-MDK-Common-924739ea37144308b968db13b6302ed4e629a803.tar.xz perl-MDK-Common-924739ea37144308b968db13b6302ed4e629a803.zip |
handle the following with no syntax error
sub
f()
{
1;
}
-rw-r--r-- | perl_checker.src/parser.mly | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/perl_checker.src/parser.mly b/perl_checker.src/parser.mly index 8c6adf9..10ad566 100644 --- a/perl_checker.src/parser.mly +++ b/perl_checker.src/parser.mly @@ -182,6 +182,7 @@ use_revision: func_decl: | SUB word { new_esp M_none ($2.any, None) $1 $2} +| SUB BAREWORD_PAREN PAREN PAREN_END { warn_rule "remove carriage return between \"sub\" and the function name"; new_esp M_none (Ident(None, $2.any, get_pos $2), Some "") $1 $4 } | 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 */ |