MCPcopy Create free account
hub / github.com/Nic30/hdlConvertor / visitFor_initialization

Method visitFor_initialization

src/svConvertor/statementParser.cpp:549–572  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

547}
548
549void VerStatementParser::visitFor_initialization(
550 sv2017Parser::For_initializationContext *ctx,
551 vector<unique_ptr<iHdlStatement>> &res) {
552 // for_initialization:
553 // list_of_variable_assignments
554 // | for_variable_declaration ( COMMA for_variable_declaration )*
555 // ;
556 auto lva = ctx->list_of_variable_assignments();
557 if (lva) {
558 // list_of_variable_assignments: variable_assignment ( COMMA variable_assignment )*;
559 for (auto _va : lva->variable_assignment()) {
560 auto va = visitVariable_assignment(_va);
561 res.push_back(move(va));
562 }
563 } else {
564 auto fvds = ctx->for_variable_declaration();
565 assert(fvds.size());
566 for (auto _fvd : fvds) {
567 visitFor_variable_declaration(_fvd,
568 reinterpret_cast<vector<unique_ptr<HdlIdDef>>&>(res));
569 }
570 }
571
572}
573
574void VerStatementParser::visitFor_step(sv2017Parser::For_stepContext *ctx,
575 vector<unique_ptr<iHdlStatement>> &res) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected