summaryrefslogtreecommitdiffstats
path: root/perl_checker.src
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-09-30 16:50:56 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-09-30 16:50:56 +0000
commit76ca19f66e50228c0c2782b1ab4ea7c62ec27819 (patch)
tree2967a115b8981c38436bfc9e57e2d0a5f378d69f /perl_checker.src
parent9baac87147e46384da1f3a18ebf1363f21638ee9 (diff)
downloadperl-MDK-Common-76ca19f66e50228c0c2782b1ab4ea7c62ec27819.tar
perl-MDK-Common-76ca19f66e50228c0c2782b1ab4ea7c62ec27819.tar.gz
perl-MDK-Common-76ca19f66e50228c0c2782b1ab4ea7c62ec27819.tar.bz2
perl-MDK-Common-76ca19f66e50228c0c2782b1ab4ea7c62ec27819.tar.xz
perl-MDK-Common-76ca19f66e50228c0c2782b1ab4ea7c62ec27819.zip
nice error message for qx{...} (instead of a syntax error)
Diffstat (limited to 'perl_checker.src')
-rw-r--r--perl_checker.src/lexer.mll5
1 files changed, 4 insertions, 1 deletions
diff --git a/perl_checker.src/lexer.mll b/perl_checker.src/lexer.mll
index eb43d42..b1250e3 100644
--- a/perl_checker.src/lexer.mll
+++ b/perl_checker.src/lexer.mll
@@ -639,7 +639,10 @@ rule token = parse
| stash "::" { putback lexbuf 2; ident_type_from_char None "main" lexbuf (lexeme_char lexbuf 0) }
| ident? ("::" ident)+ { ident_from_lexbuf lexbuf }
-| ident { not_ok_for_match := lexeme_end lexbuf; BAREWORD(lexeme lexbuf, pos lexbuf) }
+| ident { not_ok_for_match := lexeme_end lexbuf;
+ let word = lexeme lexbuf in
+ if word = "qx" then die lexbuf "don't use qx{...}, use `...` instead" else
+ BAREWORD(word, pos lexbuf) }
| ident ":" { LABEL(lexeme lexbuf, pos lexbuf) }