~davidagraf/zorba/trace_without_debug_info

« back to all changes in this revision

Viewing changes to src/compiler/expression/expr_put.cpp

  • Committer: David Graf
  • Date: 2012-06-27 07:20:59 UTC
  • mfrom: (10869.1.25 zorba)
  • Revision ID: davidagraf@gmail.com-20120627072059-723duu6vsbqu60ax
merged trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
#include "compiler/expression/expr.h"
31
31
#include "compiler/expression/fo_expr.h"
32
32
#include "compiler/expression/script_exprs.h"
 
33
#include "compiler/expression/json_exprs.h"
33
34
#include "compiler/expression/update_exprs.h"
34
35
#ifndef ZORBA_NO_FULL_TEXT
35
36
#include "compiler/expression/ft_expr.h"
249
250
 
250
251
  os << expr_addr(theVarExpr.getp());
251
252
 
252
 
  os << endl << indent << " [\n" << inc_indent;
 
253
  os << endl << indent << "[\n" << inc_indent;
253
254
 
254
255
  theDomainExpr->put(os);
255
256
#endif
530
531
 
531
532
 
532
533
#ifndef ZORBA_NO_FULL_TEXT
533
 
ostream& ftcontains_expr::put( ostream &os ) const {
 
534
ostream& ftcontains_expr::put( ostream &os ) const 
 
535
{
534
536
  BEGIN_PUT( ftcontains_expr );
535
537
  PUT_SUB( "RANGE", range_ );
536
538
  ftselection_->put( os );
822
824
  BEGIN_PUT(attr_expr);
823
825
 
824
826
  theQNameExpr->put(os);
825
 
  PUT_SUB( "=", theValueExpr );
 
827
  PUT_SUB("=", theValueExpr);
826
828
 
827
829
  END_PUT();
828
830
}
830
832
 
831
833
ostream& text_expr::put(ostream& os) const
832
834
{
833
 
  BEGIN_PUT( text_expr );
 
835
  BEGIN_PUT(text_expr);
834
836
  theContentExpr->put(os);
835
837
  END_PUT();
836
838
}
837
839
 
838
 
ostream& pi_expr::put( ostream& os) const
839
 
{
840
 
  BEGIN_PUT( pi_expr );
841
 
  PUT_SUB( "TARGET", theTargetExpr );
842
 
  PUT_SUB( "CONTENT", theContentExpr );
843
 
  END_PUT();
844
 
}
845
 
 
846
 
 
847
 
ostream& insert_expr::put( ostream& os) const
 
840
ostream& pi_expr::put(ostream& os) const
 
841
{
 
842
  BEGIN_PUT(pi_expr);
 
843
  PUT_SUB("TARGET", theTargetExpr);
 
844
  PUT_SUB("CONTENT", theContentExpr);
 
845
  END_PUT();
 
846
}
 
847
 
 
848
 
 
849
#ifdef ZORBA_WITH_JSON
 
850
ostream& json_array_expr::put(ostream& os) const
 
851
{
 
852
  BEGIN_PUT(json_array_expr);
 
853
  if (theContentExpr)
 
854
    theContentExpr->put(os);
 
855
  END_PUT();
 
856
}
 
857
 
 
858
 
 
859
ostream& json_object_expr::put(ostream& os) const
 
860
{
 
861
  BEGIN_PUT(json_object_expr);
 
862
  if (theContentExpr)
 
863
    theContentExpr->put(os);
 
864
  END_PUT();
 
865
}
 
866
 
 
867
 
 
868
ostream& json_direct_object_expr::put(ostream& os) const
 
869
{
 
870
  BEGIN_PUT(json_direct_object_expr);
 
871
 
 
872
  std::vector<expr_t>::const_iterator ite1 = theNames.begin();
 
873
  std::vector<expr_t>::const_iterator end1 = theNames.end();
 
874
  std::vector<expr_t>::const_iterator ite2 = theValues.begin();
 
875
  for (; ite1 != end1; ++ite1, ++ite2)
 
876
  {
 
877
    (*ite1)->put(os);
 
878
    (*ite2)->put(os);
 
879
  }
 
880
 
 
881
  END_PUT();
 
882
}
 
883
#endif
 
884
 
 
885
 
 
886
ostream& insert_expr::put(ostream& os) const
848
887
{
849
888
  BEGIN_PUT( insert_expr );
850
889
  theSourceExpr->put(os);
852
891
  END_PUT();
853
892
}
854
893
 
855
 
ostream& delete_expr::put( ostream& os) const
 
894
ostream& delete_expr::put(ostream& os) const
856
895
{
857
896
  BEGIN_PUT( delete_expr );
858
897
  theTargetExpr->put(os);
859
898
  END_PUT();
860
899
}
861
900
 
862
 
ostream& replace_expr::put( ostream& os) const
 
901
ostream& replace_expr::put(ostream& os) const
863
902
{
864
903
  BEGIN_PUT( replace_expr );
865
904
  theTargetExpr->put(os);