Inferno  0.2
uncombable.cpp
Go to the documentation of this file.
00001 /*
00002  * uncombable.cpp
00003  *
00004  *  Created on: 14 Mar 2012
00005  *      Author: jgraley
00006  */
00007 
00008 #include "steps/uncombable.hpp"
00009 #include "tree/cpptree.hpp"
00010 #include "common/common.hpp"
00011 #include "sr/soft_patterns.hpp"
00012 
00013 using namespace CPPTree;
00014 using namespace Steps;
00015 
00016 TreePtr<Node> Steps::MakeCheckUncombable( TreePtr<CPPTree::Statement> construct )
00017 {
00018     MakeTreePtr< MatchAll<Node> > all;
00019     MakeTreePtr< Stuff<Node> > stuff;
00020     MakeTreePtr<Uncombable> uncombable;
00021     
00022     all->patterns = (construct, stuff);
00023     stuff->terminus = uncombable;
00024     //TODO maybe restrict recursion to Statement, in case of inline functions, classes etc (though
00025     // we may never support these, or else lower them out in advance)
00026     
00027     return all;
00028 }