diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-12-16 21:17:58 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-12-16 21:17:58 +0000 |
commit | 96c8ec7494eb30ef87e7d3acf8193c5c8bf18cf3 (patch) | |
tree | a918d1a33ec178388c2c197da60835a681c11651 /perl_checker.src/parser.mly | |
parent | 86905dc107c2eaa070465392e3fd5df285204efe (diff) | |
download | perl_checker-96c8ec7494eb30ef87e7d3acf8193c5c8bf18cf3.tar perl_checker-96c8ec7494eb30ef87e7d3acf8193c5c8bf18cf3.tar.gz perl_checker-96c8ec7494eb30ef87e7d3acf8193c5c8bf18cf3.tar.bz2 perl_checker-96c8ec7494eb30ef87e7d3acf8193c5c8bf18cf3.tar.xz perl_checker-96c8ec7494eb30ef87e7d3acf8193c5c8bf18cf3.zip |
- drop internally operator "qw" by rewriting qw(...) into a list of strings
- as a side effect "foo" . qw(bar boo) is now detected
- allow pop(@l) (with explicit parentheses)
Diffstat (limited to 'perl_checker.src/parser.mly')
-rw-r--r-- | perl_checker.src/parser.mly | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/perl_checker.src/parser.mly b/perl_checker.src/parser.mly index 7760424..71f8ac0 100644 --- a/perl_checker.src/parser.mly +++ b/perl_checker.src/parser.mly @@ -353,7 +353,7 @@ terminal: | RAW_STRING {new_1pesp P_tok (to_Raw_string $1) $1} | REVISION {new_1pesp P_tok (to_Raw_string $1) $1} | COMMAND_STRING {to_Call_op_ (M_mixed[M_string; M_list]) P_tok "``" [to_String false $1] $1 $1} -| QUOTEWORDS {to_Call_op_ M_list P_tok "qw" [to_Raw_string $1] $1 $1} +| QUOTEWORDS {let l = List.map (fun s -> Raw_string(s, raw_pos2pos $1.pos)) (words $1.any) in new_pesp (M_tuple (repeat M_string (List.length l))) P_tok (List [ List l ]) $1 $1} | HERE_DOC {new_1pesp P_tok (to_String false (new_1esp (fst $1.any) $1)) $1 } | RAW_HERE_DOC {new_1pesp P_tok (Raw_string(fst $1.any, raw_pos2pos (snd $1.any))) $1} | QR_PATTERN {to_Call_op_ M_string P_tok "qr//" (from_PATTERN $1) $1 $1} |