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

Function das_accept_cpp_comment

src/parser/ds2_lexer.cpp:4692–4704  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4690}
4691
4692void das_accept_cpp_comment ( vector<CommentReader *> & crdi, yyscan_t scanner, DAS2_YYLTYPE & li, const char * text ) {
4693 if ( crdi.empty() ) return;
4694 while ( !(text[0]=='/' && text[1]=='/') && *text ) text ++;
4695 if ( *text==0 ) return;
4696 auto tak = tokAt(scanner,li);
4697 for ( auto & crd : crdi ) crd->open(false, tak);
4698 for ( auto ch = text + 2; *ch!='\n'; ++ch ) {
4699 if ( *ch!='\r' ) {
4700 for ( auto & crd : crdi ) crd->accept(*ch, tak);
4701 }
4702 }
4703 for ( auto & crd : crdi ) crd->close(tak);
4704}
4705
4706

Callers 1

ds2_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