From ab10315e01cd4962d35c9fce53a667df409372f7 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 11 Aug 2004 07:28:45 +0000 Subject: handle the following with no syntax error sub f() { 1; } --- perl_checker.src/parser.mly | 1 + 1 file changed, 1 insertion(+) (limited to 'perl_checker.src') 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 */ -- cgit v1.2.1