summaryrefslogtreecommitdiffstats
path: root/perl_checker.src/parser_helper.ml
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-02-05 13:12:04 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-02-05 13:12:04 +0000
commitdc5032ed00875c1cf4f978ddeb07e5967f9488f8 (patch)
treefc1dbda442551ee186d330b66b85f931a5586e9b /perl_checker.src/parser_helper.ml
parent614de482fdec9cf87bf6e8599ae65ac5433e3273 (diff)
downloadperl_checker-dc5032ed00875c1cf4f978ddeb07e5967f9488f8.tar
perl_checker-dc5032ed00875c1cf4f978ddeb07e5967f9488f8.tar.gz
perl_checker-dc5032ed00875c1cf4f978ddeb07e5967f9488f8.tar.bz2
perl_checker-dc5032ed00875c1cf4f978ddeb07e5967f9488f8.tar.xz
perl_checker-dc5032ed00875c1cf4f978ddeb07e5967f9488f8.zip
allow -x with no parameter, but advise not to use it
Diffstat (limited to 'perl_checker.src/parser_helper.ml')
-rw-r--r--perl_checker.src/parser_helper.ml7
1 files changed, 7 insertions, 0 deletions
diff --git a/perl_checker.src/parser_helper.ml b/perl_checker.src/parser_helper.ml
index e1633fb..9230074 100644
--- a/perl_checker.src/parser_helper.ml
+++ b/perl_checker.src/parser_helper.ml
@@ -606,6 +606,13 @@ let call(e, para) = call_func false (e, para)
let call_one_scalar_para (e, (_, pos)) para =
+ let para =
+ match para with
+ | [] ->
+ warn_rule (sprintf "please use \"%s $_\" instead of \"%s\"" e e) ;
+ [var_dollar_ (raw_pos2pos pos)]
+ | _ -> para
+ in
let pri =
match e with
| "defined" -> P_expr