Inferno  0.2
slave_test.cpp
Go to the documentation of this file.
00001 /*
00002  * slave_test.cpp
00003  */
00004 
00005 #include "steps/slave_test.hpp"
00006 #include "tree/cpptree.hpp"
00007 #include "common/common.hpp"
00008 #include "sr/soft_patterns.hpp"
00009 
00010 using namespace CPPTree;
00011 using namespace Steps;
00012 
00013 // Just an early test for slaves, not a valid transformation
00014 SlaveTest::SlaveTest()
00015 {
00016     MakeTreePtr<For> s_for;
00017     MakeTreePtr<Statement> s_body;
00018 
00019     s_for->body = s_body;
00020 
00021     MakeTreePtr<Compound> r_comp;
00022     MakeTreePtr<Statement> r_body;
00023     MakeTreePtr<Continue> ss_cont;
00024     MakeTreePtr<Break> sr_break;
00025     MakeTreePtr< SlaveCompareReplace<Statement> > r_slave( r_body, ss_cont, sr_break );
00026     r_comp->statements = ( r_slave );
00027 
00028     SearchReplace( s_for, r_comp );
00029 }