diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-12-05 23:24:35 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-12-05 23:24:35 +0000 |
commit | aa7dcfe1d2f2206b08e06fa2d0aed5e516351f5b (patch) | |
tree | b05d3a4856b67e45653e221191f25e77dcb8b195 /perl_checker.src/lexer.mll | |
parent | 4709dc6a4005bda226fb9c7b73282468d2c5d836 (diff) | |
download | perl-MDK-Common-aa7dcfe1d2f2206b08e06fa2d0aed5e516351f5b.tar perl-MDK-Common-aa7dcfe1d2f2206b08e06fa2d0aed5e516351f5b.tar.gz perl-MDK-Common-aa7dcfe1d2f2206b08e06fa2d0aed5e516351f5b.tar.bz2 perl-MDK-Common-aa7dcfe1d2f2206b08e06fa2d0aed5e516351f5b.tar.xz perl-MDK-Common-aa7dcfe1d2f2206b08e06fa2d0aed5e516351f5b.zip |
perl_checker now checks usage of $_
Diffstat (limited to 'perl_checker.src/lexer.mll')
-rw-r--r-- | perl_checker.src/lexer.mll | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/perl_checker.src/lexer.mll b/perl_checker.src/lexer.mll index b295400..448d0c9 100644 --- a/perl_checker.src/lexer.mll +++ b/perl_checker.src/lexer.mll @@ -14,6 +14,7 @@ type raw_token = | RAW_STRING of (string * raw_pos) | STRING of (raw_interpolated_string * raw_pos) | PATTERN of (raw_interpolated_string * string * raw_pos) + | QR_PATTERN of (raw_interpolated_string * string * raw_pos) | PATTERN_SUBST of (raw_interpolated_string * raw_interpolated_string * string * raw_pos) | BAREWORD of (string * raw_pos) | BAREWORD_PAREN of (string * raw_pos) @@ -66,6 +67,7 @@ let rec raw_token_to_pos_and_token spaces = function | RAW_HERE_DOC(r, pos) -> pos, Parser.RAW_HERE_DOC(!r, (spaces, pos)) | STRING(l, pos) -> pos, Parser.STRING(raw_interpolated_string_to_tokens l, (spaces, pos)) | COMMAND_STRING(l, pos) -> pos, Parser.COMMAND_STRING(raw_interpolated_string_to_tokens l, (spaces, pos)) + | QR_PATTERN(s, opts, pos) -> pos, Parser.QR_PATTERN((raw_interpolated_string_to_tokens s, opts), (spaces, pos)) | PATTERN(s, opts, pos) -> pos, Parser.PATTERN((raw_interpolated_string_to_tokens s, opts), (spaces, pos)) | PATTERN_SUBST(from, to_, opts, pos) -> pos, Parser.PATTERN_SUBST((raw_interpolated_string_to_tokens from, raw_interpolated_string_to_tokens to_, opts), (spaces, pos)) | HERE_DOC(l, pos) -> pos, Parser.HERE_DOC((raw_interpolated_string_to_tokens (fst !l), snd !l), (spaces, pos)) @@ -504,7 +506,7 @@ rule token = parse let s, pos = ins delimited_string lexbuf in let opts, _ = raw_ins pattern_options lexbuf in check_multi_line_delimited_string (Some opts) pos ; - PATTERN(s, opts, pos) + QR_PATTERN(s, opts, pos) } | "s" pattern_separator { |