MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / das_accept_cpp_comment

Function das_accept_cpp_comment

src/parser/ds_lexer.cpp:5122–5134  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5120}
5121
5122void 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

Callers 1

ds_lexer.cppFile · 0.70

Calls 5

tokAtFunction · 0.70
emptyMethod · 0.45
openMethod · 0.45
acceptMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected