diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-04-28 12:23:18 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-04-28 12:23:18 +0000 |
commit | 5086a51d09b7d5333b8b39927dba18f04c249237 (patch) | |
tree | 0b6a730e7f3d2c64de6a4d8fee99dfdd307fd35b /perl_checker.src/common.ml | |
parent | 457845c8b46fab3811b282877cc88cd67603f732 (diff) | |
download | perl_checker-5086a51d09b7d5333b8b39927dba18f04c249237.tar perl_checker-5086a51d09b7d5333b8b39927dba18f04c249237.tar.gz perl_checker-5086a51d09b7d5333b8b39927dba18f04c249237.tar.bz2 perl_checker-5086a51d09b7d5333b8b39927dba18f04c249237.tar.xz perl_checker-5086a51d09b7d5333b8b39927dba18f04c249237.zip |
handle bad PO-: comments at the lexical level instead of doing it in the grammar
to have a better error message
Diffstat (limited to 'perl_checker.src/common.ml')
-rw-r--r-- | perl_checker.src/common.ml | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/perl_checker.src/common.ml b/perl_checker.src/common.ml index 6a3be82..7d03ffb 100644 --- a/perl_checker.src/common.ml +++ b/perl_checker.src/common.ml @@ -475,6 +475,8 @@ let break_at f l = in b [] l let break v l = break_at ((=) v) l +let drop_while f l = snd (break_at (fun e -> not (f e)) l) + (* break_at_indice 0 [1;2] gives [], [1;2] break_at_indice 1 [1;2] gives [1], [2] *) |