Changeset 9661f81 in nscp for include/parsers/where.cpp
- Timestamp:
- 05/10/10 22:17:31 (3 years ago)
- Branches:
- master, 0.4.0, 0.4.1, 0.4.2, stable
- Children:
- f40d813
- Parents:
- d1029bd
- File:
-
- 1 edited
-
include/parsers/where.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
include/parsers/where.cpp
redf0848 r9661f81 37 37 38 38 value_type operator()(expression_ast<THandler> & ast) { 39 //std::wcout << _T(">>>Setting type: ") << ast.to_string() << _T(" to: ") << ast.get_type() << std::endl; 39 40 value_type type = ast.get_type(); 41 //std::wcout << _T("!!!Setting type: ") << ast.to_string() << _T(" to: ") << type << std::endl; 40 42 if (type != type_tbd) 41 43 return type; 42 44 type = boost::apply_visitor(*this, ast.expr); 43 45 ast.set_type(type); 46 //std::wcout << _T("<<<Setting type: ") << ast.to_string() << _T(" to: ") << ast.get_type() << std::endl; 44 47 return type; 45 48 } … … 71 74 return type_tbd; 72 75 if (handler.can_convert(rt, lt)) { 73 std::wcout << _T("FORCE 001") << std::endl;76 //std::wcout << _T("FORCE 001") << std::endl; 74 77 right.force_type(lt); 75 78 return lt; 76 79 } 77 80 if (handler.can_convert(lt, rt)) { 78 std::wcout << _T("FORCE 002") << std::endl;81 //std::wcout << _T("FORCE 002") << std::endl; 79 82 left.force_type(rt); 80 83 return rt; 81 84 } 82 85 if (can_convert(rt, lt)) { 83 std::wcout << _T("FORCE 003") << std::endl;86 //std::wcout << _T("FORCE 003") << std::endl; 84 87 right.force_type(lt); 85 88 return rt; 86 89 } 87 90 if (can_convert(lt, rt)) { 88 std::wcout << _T("FORCE 004") << std::endl;91 //std::wcout << _T("FORCE 004") << std::endl; 89 92 left.force_type(rt); 90 93 return lt; … … 110 113 111 114 value_type operator()(list_value<THandler> & expr) { 115 BOOST_FOREACH(expression_ast<THandler> &e, expr.list) { 116 operator()(e); 117 } 112 118 return type_tbd; 113 119 } … … 171 177 172 178 bool operator()(list_value<THandler> & expr) { 173 // TODO: this is incorrect! 179 BOOST_FOREACH(expression_ast<THandler> e, expr.list) { 180 operator()(e); 181 } 174 182 return true; 175 183 } … … 218 226 219 227 bool operator()(list_value<THandler> & expr) { 220 BOOST_FOREACH(expression_ast<THandler> e, expr.list) {228 BOOST_FOREACH(expression_ast<THandler> &e, expr.list) { 221 229 operator()(e); 222 230 } … … 242 250 bool parser<THandler>::parse(std::wstring expr) { 243 251 constants::reset(); 244 std::wcout << _T("Current time is: ") << constants::get_now() << std::endl;252 //std::wcout << _T("Current time is: ") << constants::get_now() << std::endl; 245 253 typedef std::wstring::const_iterator iterator_type; 246 254 typedef where_grammar<THandler, iterator_type> grammar;
Note: See TracChangeset
for help on using the changeset viewer.








