Permalink
Browse files

trim expr when parse expr

  • Loading branch information...
1 parent 3af22e7 commit a51cd0fe3772aa4bf783e384c1f349006f4e6693 @liseen liseen committed Oct 26, 2010
Showing with 4 additions and 0 deletions.
  1. +4 −0 lib/SSH/Batch/ForNodes.pm
View
4 lib/SSH/Batch/ForNodes.pm
@@ -96,6 +96,10 @@ sub parse_line ($$) {
sub parse_expr ($) {
local *_ = \($_[0]);
+
+ # trim
+ s/(?:^\s+|\s+$)//gs;
+
my @toplevel;
while (1) {
if (/\G \s* (?<= [\}\)\s] ) ([-+*\/]) (?= [\{\(\s] ) \s*/gcx) {

0 comments on commit a51cd0f

Please sign in to comment.