| 5120 | } |
| 5121 | |
| 5122 | void das_accept_cpp_comment ( vector<CommentReader *> & crdi, yyscan_t scanner, DAS_YYLTYPE & li, const char * text ) { |
| 5123 | if ( crdi.empty() ) return; |
| 5124 | while ( !(text[0]=='/' && text[1]=='/') && *text ) text ++; |
| 5125 | if ( *text==0 ) return; |
| 5126 | auto tak = tokAt(scanner,li); |
| 5127 | for ( auto & crd : crdi ) crd->open(false, tak); |
| 5128 | for ( auto ch = text + 2; *ch!='\n'; ++ch ) { |
| 5129 | if ( *ch!='\r' ) { |
| 5130 | for ( auto & crd : crdi ) crd->accept(*ch, tak); |
| 5131 | } |
| 5132 | } |
| 5133 | for ( auto & crd : crdi ) crd->close(tak); |
| 5134 | } |
| 5135 | |