diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2004-08-11 06:38:39 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2004-08-11 06:38:39 +0000 |
commit | 1d3f6efca14a3a88ee8bb8b3ea488245e8dfc44c (patch) | |
tree | b205198c00a175ba5ca19e7725275e7b6def32c6 | |
parent | 6fca507b8021dc55e3d3402ad43cd872537100e8 (diff) | |
download | perl-MDK-Common-1d3f6efca14a3a88ee8bb8b3ea488245e8dfc44c.tar perl-MDK-Common-1d3f6efca14a3a88ee8bb8b3ea488245e8dfc44c.tar.gz perl-MDK-Common-1d3f6efca14a3a88ee8bb8b3ea488245e8dfc44c.tar.bz2 perl-MDK-Common-1d3f6efca14a3a88ee8bb8b3ea488245e8dfc44c.tar.xz perl-MDK-Common-1d3f6efca14a3a88ee8bb8b3ea488245e8dfc44c.zip |
enforce spaces around operator "." (string concat)
-rw-r--r-- | perl_checker.src/parser.mly | 2 | ||||
-rw-r--r-- | perl_checker.src/test/force_layout.t | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/perl_checker.src/parser.mly b/perl_checker.src/parser.mly index ffc6c40..8c6adf9 100644 --- a/perl_checker.src/parser.mly +++ b/perl_checker.src/parser.mly @@ -217,7 +217,7 @@ term: | term POWER term { symops P_tight M_float (mcontext_float_or_int [$1.mcontext; $3.mcontext]) "**" $1 $2 $3} | term PLUS term { symops P_add M_float (mcontext_float_or_int [$1.mcontext; $3.mcontext]) $2.any $1 $2 $3} -| term CONCAT term { symops P_add M_string M_string "." $1 $2 $3} +| term CONCAT term {sp_p $2; symops P_add M_string M_string "." $1 $2 $3} | term BIT_SHIFT term { symops (P_paren_wanted P_tight) M_int M_int $2.any $1 $2 $3} | term XOR term {sp_p $2; symops (P_paren_wanted P_expr) M_bool M_bool "xor" $1 $2 $3} | term DOTDOT term { symops (P_paren_wanted P_expr) M_unknown_scalar M_string $2.any $1 $2 $3} diff --git a/perl_checker.src/test/force_layout.t b/perl_checker.src/test/force_layout.t index 96b3d71..d8aa076 100644 --- a/perl_checker.src/test/force_layout.t +++ b/perl_checker.src/test/force_layout.t @@ -12,3 +12,4 @@ my($_xxx, $_yyy) you should have a space here xxx ($xxx) you should not have a space here +'foo'.'bar' you should have a space here |