X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FSQL%2FAbstract%2FTree.pm;fp=lib%2FSQL%2FAbstract%2FTree.pm;h=3791fe9d2e94b69ccf025fb1cf4dd9d18b407327;hb=ca4f826a37ccb5194b0b5b9b4190b4007d647d9c;hp=79e6ef3a105cd98a81ea9cc824a0a3f894cc2805;hpb=0e49a4874db140e947911a9bce927332bdf74e02;p=dbsrgits%2FSQL-Abstract.git diff --git a/lib/SQL/Abstract/Tree.pm b/lib/SQL/Abstract/Tree.pm index 79e6ef3..3791fe9 100644 --- a/lib/SQL/Abstract/Tree.pm +++ b/lib/SQL/Abstract/Tree.pm @@ -340,7 +340,7 @@ sub _recurse_parse { my @left; while (1) { # left-associative parsing - if ( ! @$tokens + if (! @$tokens or ($state == PARSE_IN_PARENS && $tokens->[0] eq ')') or @@ -418,19 +418,19 @@ sub _recurse_parse { } # unary op keywords - elsif ( $token =~ $unary_op_re ) { + elsif ($token =~ $unary_op_re) { my $op = uc $token; # normalize RNO explicitly $op = 'ROW_NUMBER() OVER' if $op =~ /^$rno_re$/; - my @right = $self->_recurse_parse ($tokens, PARSE_RHS); + my @right = $self->_recurse_parse($tokens, PARSE_RHS); push @left, [ $op => \@right ]; } # expression terminator keywords - elsif ( $token =~ $expr_start_re ) { + elsif ($token =~ $expr_start_re) { my $op = uc $token; my @right = $self->_recurse_parse($tokens, PARSE_IN_EXPR); @@ -438,7 +438,7 @@ sub _recurse_parse { } # a '?' - elsif ( $token =~ $placeholder_re) { + elsif ($token =~ $placeholder_re) { push @left, [ -PLACEHOLDER => [ $token ] ]; } @@ -462,7 +462,7 @@ sub _recurse_parse { and $tokens->[0] !~ $all_std_keywords_re and - ! ( @$tokens > 1 and $tokens->[1] eq '(' ) + ! (@$tokens > 1 and $tokens->[1] eq '(') ) { push @lits, [ -LITERAL => [ shift @$tokens ] ]; }