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

Method visitArray_pattern_key

src/svConvertor/exprPrimaryParser.cpp:291–306  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289 }
290}
291std::unique_ptr<hdlAst::iHdlExprItem> VerExprPrimaryParser::visitArray_pattern_key(
292 sv2017Parser::Array_pattern_keyContext *ctx) {
293 // array_pattern_key:
294 // constant_expression
295 // | assignment_pattern_key
296 // ;
297 auto ce = ctx->constant_expression();
298 if (ce) {
299 VerExprParser ep(this);
300 return ep.visitConstant_expression(ce);
301 } else {
302 auto apk = ctx->assignment_pattern_key();
303 assert(apk);
304 return visitAssignment_pattern_key(apk);
305 }
306}
307std::unique_ptr<hdlAst::iHdlExprItem> VerExprPrimaryParser::visitAssignment_pattern_key(
308 sv2017Parser::Assignment_pattern_keyContext *ctx) {
309 // assignment_pattern_key:

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected