← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba

 

Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba.

Commit message:
count clause defines a new variables scope

Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/161331

count clause defines a new variables scope
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/161331
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp	2013-04-27 13:42:09 +0000
+++ src/compiler/translator/translator.cpp	2013-04-28 16:24:25 +0000
@@ -6756,9 +6756,13 @@
       pop_scope();
       break;
     }
+    case flwor_clause::count_clause:
+    {
+      pop_scope();
+      break;
+    }
     case flwor_clause::orderby_clause:
     case flwor_clause::where_clause:
-    case flwor_clause::count_clause:
     {
       break;
     }
@@ -7756,6 +7760,8 @@
 {
   TRACE_VISIT_OUT();
 
+  push_scope();
+
   var_expr* varExpr = bind_var(loc, v.get_varname(), var_expr::count_var, NULL);
 
   count_clause* clause = theExprManager->create_count_clause(theRootSctx,

=== modified file 'test/fots/CMakeLists.txt'
--- test/fots/CMakeLists.txt	2013-04-27 14:31:20 +0000
+++ test/fots/CMakeLists.txt	2013-04-28 16:24:25 +0000
@@ -294,8 +294,6 @@
 EXPECTED_FOTS_FAILURE (prod-CastableExpr K-SeqExprCastable-5a 0)
 EXPECTED_FOTS_FAILURE (prod-CompDocConstructor K2-ConDocNode-2 0)
 EXPECTED_FOTS_FAILURE (prod-ContextItemDecl contextDecl-047 0)
-EXPECTED_FOTS_FAILURE (prod-CountClause count-007 0)
-EXPECTED_FOTS_FAILURE (prod-CountClause count-008 0)
 EXPECTED_FOTS_FAILURE (prod-DefaultNamespaceDecl defaultnamespacedeclerr-6 0)
 EXPECTED_FOTS_FAILURE (prod-DefaultNamespaceDecl defaultnamespacedeclerr-8 0)
 EXPECTED_FOTS_FAILURE (prod-DirElemContent Constr-cont-charref-2 1130998)


Follow ups