diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2003-05-26 11:20:35 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2003-05-26 11:20:35 +0000 |
commit | 20bfec8ac87454cb13f370fbf3c9b7a9c942199a (patch) | |
tree | 667d5a0a29163da3dc15d3f85a1618e11908a964 /perl_checker.src | |
parent | 71e22a18b8733c7fb0aab0f2a82172e742afdaa4 (diff) | |
download | perl_checker-20bfec8ac87454cb13f370fbf3c9b7a9c942199a.tar perl_checker-20bfec8ac87454cb13f370fbf3c9b7a9c942199a.tar.gz perl_checker-20bfec8ac87454cb13f370fbf3c9b7a9c942199a.tar.bz2 perl_checker-20bfec8ac87454cb13f370fbf3c9b7a9c942199a.tar.xz perl_checker-20bfec8ac87454cb13f370fbf3c9b7a9c942199a.zip |
explicitly disallow <<=, >>= and **= (instead of having a syntax error)
Diffstat (limited to 'perl_checker.src')
-rw-r--r-- | perl_checker.src/lexer.mll | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/perl_checker.src/lexer.mll b/perl_checker.src/lexer.mll index e43aa9f..0153374 100644 --- a/perl_checker.src/lexer.mll +++ b/perl_checker.src/lexer.mll @@ -417,6 +417,11 @@ rule token = parse | "=" | "+=" | "-=" | "*=" | ".=" | "|=" | "&=" | "^=" | "||=" | "&&=" { ASSIGN(lexeme lexbuf, pos lexbuf) } +| "<<=" | ">>=" | "**=" { + warn lexbuf (Printf.sprintf "don't use \"%s\", use the expanded version instead" (lexeme lexbuf)) ; + ASSIGN(lexeme lexbuf, pos lexbuf) + } + | "," { COMMA(pos lexbuf) } | "=>" { RIGHT_ARROW(pos lexbuf) } | "not" { NOT(pos lexbuf) } |