• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Nic30 / hdlConvertor / #201

10 Jun 2025 02:39PM UTC coverage: 59.995% (-2.5%) from 62.506%
#201

push

travis-ci

Nic30
Merge remote-tracking branch 'origin/mesonbuild'

109 of 127 new or added lines in 14 files covered. (85.83%)

11 existing lines in 6 files now uncovered.

41572 of 69293 relevant lines covered (59.99%)

1047819.11 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

85.78
/src/svConvertor/exprPrimaryParser.cpp
1
#include <hdlConvertor/svConvertor/exprPrimaryParser.h>
2
#include <hdlConvertor/svConvertor/attributeParser.h>
3
#include <hdlConvertor/svConvertor/exprParser.h>
4
#include <hdlConvertor/svConvertor/literalParser.h>
5
#include <hdlConvertor/svConvertor/typeParser.h>
6
#include <hdlConvertor/svConvertor/utils.h>
7
#include <hdlConvertor/notImplementedLogger.h>
8
#include <hdlConvertor/createObject.h>
9

10
namespace hdlConvertor {
11
namespace sv {
12

13
using namespace std;
14
using namespace hdlConvertor::hdlAst;
15

16
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimary(
747,356✔
17
                sv2017Parser::PrimaryContext *ctx) {
18
        // primary:
19
        //     primary_literal                               #primaryLit
20
        //     | package_or_class_scoped_path                #primaryPath
21
        //     | LPAREN mintypmax_expression RPAREN          #primaryPar
22
        //     | ( KW_STRING
23
        //         | KW_CONST
24
        //         | integer_type
25
        //         | non_integer_type
26
        //         | signing
27
        //         ) APOSTROPHE LPAREN expression RPAREN     #primaryCast
28
        //     | primary APOSTROPHE LPAREN expression RPAREN #primaryCast2
29
        //     | primary bit_select                          #primaryBitSelect
30
        //     | primary DOT identifier                      #primaryDot
31
        //     | primary LSQUARE_BR array_range_expression RSQUARE_BR #primaryIndex
32
        //     | concatenation                                        #primaryConcat
33
        //     | streaming_concatenation                              #primaryStreaming_concatenation
34
        //     | any_system_tf_identifier ( LPAREN data_type COMMA list_of_arguments
35
        //          ( COMMA clocking_event )? RPAREN
36
        //          | LPAREN list_of_arguments COMMA clocking_event  RPAREN
37
        //          )?                                       #primaryTfCall
38
        //     | ( KW_STD DOUBLE_COLON )?  randomize_call    #primaryRandomize
39
        //     | primary DOT randomize_call                  #primaryRandomize2
40
        //     /*| let_expression                            #primaryLet (same as call)*/
41
        //     | assignment_pattern_expression               #primaryAssig
42
        //     | type_reference                              #primaryTypeRef
43
        //     | primary ( DOT array_method_name )? ( attribute_instance )*
44
        //                   LPAREN ( list_of_arguments )? RPAREN
45
        //                   ( KW_WITH LPAREN expression RPAREN )? #primaryCall
46
        //     | primary DOT array_method_name               # primaryCallArrayMethodNoArgs
47
        //     | primary ( DOT array_method_name )? ( attribute_instance )*
48
        //              KW_WITH LPAREN expression RPAREN     #primaryCallWith
49
        // ;
50
        if (dynamic_cast<sv2017Parser::PrimaryLitContext*>(ctx)) {
747,356✔
51
                auto l =
52
                                static_cast<sv2017Parser::PrimaryLitContext*>(ctx)->primary_literal();
325,438✔
53
                return VerLiteralParser::visitPrimary_literal(l);
325,438✔
54
        }
55

56
        if (dynamic_cast<sv2017Parser::PrimaryPathContext*>(ctx)) {
421,918✔
57
                auto p =
58
                                static_cast<sv2017Parser::PrimaryPathContext*>(ctx)->package_or_class_scoped_path();
240,900✔
59
                VerExprParser ep(this);
240,900✔
60
                return ep.visitPackage_or_class_scoped_path(p);
240,900✔
61
        }
62

63
        if (dynamic_cast<sv2017Parser::PrimaryParContext*>(ctx)) {
181,018✔
64
                auto e =
65
                                static_cast<sv2017Parser::PrimaryParContext*>(ctx)->mintypmax_expression();
65,527✔
66
                return VerExprParser(this).visitMintypmax_expression(e);
65,527✔
67
        }
68

69
        if (dynamic_cast<sv2017Parser::PrimaryCastContext*>(ctx)) {
115,491✔
70
                return visitPrimaryCast(
71
                                static_cast<sv2017Parser::PrimaryCastContext*>(ctx));
61✔
72
        }
73

74
        if (dynamic_cast<sv2017Parser::PrimaryCast2Context*>(ctx)) {
115,430✔
75
                return visitPrimaryCast2(
76
                                static_cast<sv2017Parser::PrimaryCast2Context*>(ctx));
278✔
77
        }
78

79
        if (dynamic_cast<sv2017Parser::PrimaryBitSelectContext*>(ctx)) {
115,152✔
80
                return visitPrimaryBitSelect(
81
                                static_cast<sv2017Parser::PrimaryBitSelectContext*>(ctx));
17,778✔
82
        }
83

84
        if (dynamic_cast<sv2017Parser::PrimaryDotContext*>(ctx)) {
97,374✔
85
                return visitPrimaryDot(
86
                                static_cast<sv2017Parser::PrimaryDotContext*>(ctx));
5,374✔
87
        }
88

89
        if (dynamic_cast<sv2017Parser::PrimaryIndexContext*>(ctx)) {
92,000✔
90
                return visitPrimaryIndex(
91
                                static_cast<sv2017Parser::PrimaryIndexContext*>(ctx));
8,773✔
92
        }
93

94
        if (dynamic_cast<sv2017Parser::PrimaryConcatContext*>(ctx)) {
83,227✔
95
                return visitPrimaryConcat(
96
                                static_cast<sv2017Parser::PrimaryConcatContext*>(ctx));
6,945✔
97
        }
98

99
        if (dynamic_cast<sv2017Parser::PrimaryStreaming_concatenationContext*>(ctx)) {
76,282✔
100
                return visitPrimaryStreaming_concatenation(
101
                                static_cast<sv2017Parser::PrimaryStreaming_concatenationContext*>(ctx));
3✔
102
        }
103

104
        if (dynamic_cast<sv2017Parser::PrimaryTfCallContext*>(ctx)) {
76,279✔
105
                return visitPrimaryTfCall(
106
                                static_cast<sv2017Parser::PrimaryTfCallContext*>(ctx));
66,498✔
107
        }
108

109
        if (dynamic_cast<sv2017Parser::PrimaryRandomizeContext*>(ctx)) {
9,781✔
110
                return visitPrimaryRandomize(
111
                                static_cast<sv2017Parser::PrimaryRandomizeContext*>(ctx));
×
112
        }
113

114
        if (dynamic_cast<sv2017Parser::PrimaryRandomize2Context*>(ctx)) {
9,781✔
115
                return visitPrimaryRandomize2(
116
                                static_cast<sv2017Parser::PrimaryRandomize2Context*>(ctx));
×
117
        }
118
        if (dynamic_cast<sv2017Parser::PrimaryAssigContext*>(ctx)) {
9,781✔
119
                return visitPrimaryAssig(
120
                                static_cast<sv2017Parser::PrimaryAssigContext*>(ctx));
193✔
121
        }
122

123
        if (dynamic_cast<sv2017Parser::PrimaryTypeRefContext*>(ctx)) {
9,588✔
124
                return visitPrimaryTypeRef(
125
                                static_cast<sv2017Parser::PrimaryTypeRefContext*>(ctx));
×
126
        }
127

128
        if (dynamic_cast<sv2017Parser::PrimaryCallContext*>(ctx)) {
9,588✔
129
                return visitPrimaryCall(
130
                                static_cast<sv2017Parser::PrimaryCallContext*>(ctx));
9,577✔
131
        }
132

133
        if (dynamic_cast<sv2017Parser::PrimaryCallArrayMethodNoArgsContext*>(ctx)) {
11✔
134
                return visitPrimaryCallArrayMethodNoArgs(
135
                                static_cast<sv2017Parser::PrimaryCallArrayMethodNoArgsContext*>(ctx));
8✔
136
        }
137

138
        if (dynamic_cast<sv2017Parser::PrimaryCallWithContext*>(ctx)) {
3✔
139
                return visitPrimaryCallWith(
140
                                static_cast<sv2017Parser::PrimaryCallWithContext*>(ctx));
3✔
141
        }
142
        assert(false && "unexpected item in this context");
×
143
        return nullptr;
144
}
145

146
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryCast(
61✔
147
                sv2017Parser::PrimaryCastContext *ctx) {
148
        //     | ( KW_STRING
149
        //         | KW_CONST
150
        //         | integer_type
151
        //         | non_integer_type
152
        //         | signing
153
        //         ) APOSTROPHE LPAREN expression RPAREN     #PrimaryCast
154

155
        NotImplementedLogger::print("VerExprPrimaryParser.visitPrimaryCast", ctx);
61✔
156
        return create_object<HdlExprNotImplemented>(ctx);
61✔
157
}
158

159
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryCast2(
278✔
160
                sv2017Parser::PrimaryCast2Context *ctx) {
161
        //     | primary APOSTROPHE LPAREN expression RPAREN #PrimaryCast2
162
        auto _p = ctx->primary();
278✔
163
        auto p = visitPrimary(_p);
278✔
164
        auto _e = ctx->expression();
278✔
165
        VerExprParser ep(this);
278✔
166
        auto e = ep.visitExpression(_e);
278✔
167
        return create_object<HdlOp>(ctx, move(p), HdlOpType::CALL, move(e));
556✔
168
}
278✔
169

170
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryBitSelect(
17,778✔
171
                sv2017Parser::PrimaryBitSelectContext *ctx) {
172
        //     | primary bit_select                          #PrimaryBitSelect
173
        auto _p = ctx->primary();
17,778✔
174
        auto p = visitPrimary(_p);
17,778✔
175
        auto _bs = ctx->bit_select();
17,778✔
176
        VerExprParser ep(this);
17,778✔
177
        return ep.visitBit_select(_bs, move(p));
35,556✔
178
}
17,778✔
179

180
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryDot(
5,374✔
181
                sv2017Parser::PrimaryDotContext *ctx) {
182
        //     | primary DOT identifier                      #PrimaryDot
183
        auto _p = ctx->primary();
5,374✔
184
        auto p = visitPrimary(_p);
5,374✔
185
        auto _id = ctx->identifier();
5,374✔
186
        auto id = VerExprParser::visitIdentifier(_id);
5,374✔
187
        return append_expr(_p, move(p), HdlOpType::DOT, move(id));
10,748✔
188
}
5,374✔
189

190
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryIndex(
8,773✔
191
                sv2017Parser::PrimaryIndexContext *ctx) {
192
        //     | primary LSQUARE_BR array_range_expression RSQUARE_BR #PrimaryIndex
193
        auto _p = ctx->primary();
8,773✔
194
        auto p = visitPrimary(_p);
8,773✔
195
        auto _are = ctx->array_range_expression();
8,773✔
196
        VerExprParser ep(this);
8,773✔
197
        auto are = ep.visitArray_range_expression(_are);
8,773✔
198
        p = append_expr(_p, move(p), HdlOpType::INDEX, move(are));
8,773✔
199
        return p;
8,773✔
200
}
8,773✔
201

202
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryConcat(
6,945✔
203
                sv2017Parser::PrimaryConcatContext *ctx) {
204
        //     | concatenation                                        #PrimaryConcat
205
        auto c = ctx->concatenation();
6,945✔
206
        VerExprParser ep(this);
6,945✔
207
        return ep.visitConcatenation(c);
13,890✔
208
}
209

210
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryStreaming_concatenation(
3✔
211
                sv2017Parser::PrimaryStreaming_concatenationContext *ctx) {
212
        //     | streaming_concatenation                              #PrimaryStreaming_concatenation
213

214
        NotImplementedLogger::print(
3✔
215
                        "VerExprPrimaryParser.visitPrimaryStreaming_concatenation", ctx);
216
        return create_object<HdlExprNotImplemented>(ctx);
3✔
217
}
218

219
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryTfCall(
66,498✔
220
                sv2017Parser::PrimaryTfCallContext *ctx) {
221
        //     | any_system_tf_identifier ( LPAREN data_type COMMA list_of_arguments
222
        //          ( COMMA clocking_event )? RPAREN
223
        //          | LPAREN list_of_arguments ( COMMA clocking_event )?  RPAREN
224
        //          )?                                       #PrimaryTfCall
225
        auto astfi = ctx->any_system_tf_identifier();
66,498✔
226
        auto id = VerLiteralParser::visitAny_system_tf_identifier(astfi);
66,498✔
227

228
        VerExprParser ep(this);
66,498✔
229
        VerTypeParser tp(this);
66,498✔
230
        vector<unique_ptr<iHdlExprItem>> args;
66,498✔
231
        auto _dt = ctx->data_type();
66,498✔
232
        if (_dt)
66,498✔
233
                args.push_back(tp.visitData_type(_dt));
5,979✔
234
        auto loa = ctx->list_of_arguments();
66,498✔
235
        if (loa)
66,498✔
236
                ep.visitList_of_arguments(loa, args);
42,746✔
237

238
        auto ce = ctx->clocking_event();
66,498✔
239
        if (ce) {
66,498✔
240
                NotImplementedLogger::print(
×
241
                                "VerExprPrimaryParser.visitPrimaryTfCall.clocking_event", ctx);
242
                // args.push_back(ep.visitClocking_event(ce));
243
        }
244
        return HdlOp::call(ctx, move(id), args);
132,996✔
245
}
66,498✔
246

247
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryRandomize(
×
248
                sv2017Parser::PrimaryRandomizeContext *ctx) {
249
        //     | ( KW_STD DOUBLE_COLON )?  randomize_call    #PrimaryRandomize
250

251
        NotImplementedLogger::print("VerExprPrimaryParser.visitPrimaryRandomize",
×
252
                        ctx);
253
        return create_object<HdlExprNotImplemented>(ctx);
×
254
}
255
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryRandomize2(
×
256
                sv2017Parser::PrimaryRandomize2Context *ctx) {
257
        //     | primary DOT randomize_call                  #PrimaryRandomize2
258

259
        NotImplementedLogger::print("VerExprPrimaryParser.visitPrimaryRandomize2",
×
260
                        ctx);
261
        return create_object<HdlExprNotImplemented>(ctx);
×
262
}
263
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryAssig(
193✔
264
                sv2017Parser::PrimaryAssigContext *ctx) {
265
        //     | assignment_pattern_expression               #PrimaryAssig
266
        // assignment_pattern_expression:
267
        //  ( assignment_pattern_expression_type )? assignment_pattern;
268
        auto ape = ctx->assignment_pattern_expression();
193✔
269
        if (ape->assignment_pattern_expression_type()) {
193✔
270
                NotImplementedLogger::print(
×
271
                                "VerExprPrimaryParser.visitPrimaryAssig assignment_pattern_expression_type",
272
                                ctx);
273
        }
274
        return visitAssignment_pattern(ape->assignment_pattern());
193✔
275
}
276

277
std::unique_ptr<hdlAst::iHdlExprItem> VerExprPrimaryParser::visitStructure_pattern_key(
80✔
278
                sv2017Parser::Structure_pattern_keyContext *ctx) {
279
        // structure_pattern_key:
280
        //  identifier
281
        //   | assignment_pattern_key
282
        // ;
283
        auto i = ctx->identifier();
80✔
284
        if (i) {
80✔
285
                VerExprParser ep(this);
63✔
286
                return ep.visitIdentifier(i);
63✔
287
        } else {
288
                return visitAssignment_pattern_key(ctx->assignment_pattern_key());
17✔
289
        }
290
}
291
std::unique_ptr<hdlAst::iHdlExprItem> VerExprPrimaryParser::visitArray_pattern_key(
35✔
292
                sv2017Parser::Array_pattern_keyContext *ctx) {
293
        // array_pattern_key:
294
        //  constant_expression
295
        //   | assignment_pattern_key
296
        // ;
297
        auto ce = ctx->constant_expression();
35✔
298
        if (ce) {
35✔
299
                VerExprParser ep(this);
28✔
300
                return ep.visitConstant_expression(ce);
28✔
301
        } else {
302
                auto apk = ctx->assignment_pattern_key();
7✔
303
                assert(apk);
7✔
304
                return visitAssignment_pattern_key(apk);
7✔
305
        }
306
}
307
std::unique_ptr<hdlAst::iHdlExprItem> VerExprPrimaryParser::visitAssignment_pattern_key(
24✔
308
                sv2017Parser::Assignment_pattern_keyContext *ctx) {
309
        // assignment_pattern_key:
310
        //  KW_DEFAULT
311
        //   | integer_type
312
        //   | non_integer_type
313
        //   | package_or_class_scoped_path
314
        // ;
315
        if (ctx->KW_DEFAULT()) {
24✔
316
                return make_unique<HdlValueId>("default");
24✔
317
        }
318
        auto it = ctx->integer_type();
×
319
        if (it) {
×
320
                NotImplementedLogger::print(
×
321
                                "VerExprPrimaryParser.visitAssignment_pattern_key integer_type",
322
                                ctx);
323
                return create_object<HdlExprNotImplemented>(ctx);
×
324
        }
325
        auto nit = ctx->non_integer_type();
×
326
        if (nit) {
×
327
                NotImplementedLogger::print(
×
328
                                "VerExprPrimaryParser.visitAssignment_pattern non_integer_type",
329
                                ctx);
330
                return create_object<HdlExprNotImplemented>(ctx);
×
331
        }
332
        auto pcsp = ctx->package_or_class_scoped_path();
×
333
        assert(pcsp);
×
334
        VerExprParser ep(this);
×
335
        return ep.visitPackage_or_class_scoped_path(pcsp);
×
336
}
337

338
std::unique_ptr<hdlAst::iHdlExprItem> VerExprPrimaryParser::visitAssignment_pattern(
193✔
339
                sv2017Parser::Assignment_patternContext *ctx) {
340
        // assignment_pattern:
341
        //     APOSTROPHE_LBRACE (
342
        //         expression ( COMMA expression )*
343
        //         | structure_pattern_key COLON expression
344
        //            ( COMMA structure_pattern_key COLON expression )*
345
        //         | array_pattern_key COLON expression
346
        //            ( COMMA array_pattern_key COLON expression )*
347
        //         | constant_expression LBRACE expression ( COMMA expression )* RBRACE
348
        //     )? RBRACE;
349
        std::vector<std::unique_ptr<iHdlExprItem>> keys;
193✔
350
        auto exprs = make_unique<std::vector<std::unique_ptr<iHdlExprItem>>>();
193✔
351
        for (auto e : ctx->expression()) {
797✔
352
                auto o = VerExprParser(this).visitExpression(e);
604✔
353
                exprs->push_back(move(o));
604✔
354
        }
797✔
355
        auto sp = ctx->structure_pattern_key();
193✔
356
        if (sp.size()) {
193✔
357
                for (auto _sp : sp) {
118✔
358
                        keys.push_back(visitStructure_pattern_key(_sp));
80✔
359
                }
360
        } else {
361
                auto ap = ctx->array_pattern_key();
155✔
362
                if (ap.size()) {
155✔
363
                        for (auto _ap : ap) {
47✔
364
                                keys.push_back(visitArray_pattern_key(_ap));
35✔
365
                        }
366
                }
367
        }
155✔
368
        auto ce = ctx->constant_expression();
193✔
369
        if (ce) {
193✔
370
                NotImplementedLogger::print(
20✔
371
                                "VerExprPrimaryParser.visitAssignment_pattern constant_expression",
372
                                ctx);
373
                return create_object<HdlExprNotImplemented>(ctx);
20✔
374
        }
375
        if (keys.size()) {
173✔
376
                // associate keys with items (create a list of key:expr)
377
                auto new_exprs =
378
                                make_unique<std::vector<std::unique_ptr<iHdlExprItem>>>();
50✔
379
                auto e_it = exprs->begin();
50✔
380
                assert(keys.size() == exprs->size());
50✔
381
                for (auto &k : keys) {
165✔
382
                        auto n_e = make_unique<HdlOp>(move(k), HdlOpType::MAP_ASSOCIATION,
115✔
383
                                        move(*e_it));
230✔
384
                        new_exprs->push_back(move(n_e));
115✔
385
                        ++e_it;
115✔
386
                }
115✔
387
                exprs = move(new_exprs);
50✔
388
        }
50✔
389

390
        return make_unique<HdlValueArr>(move(exprs));
173✔
391
}
193✔
392
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryTypeRef(
×
393
                sv2017Parser::PrimaryTypeRefContext *ctx) {
394
        //     | type_reference                              #PrimaryTypeRef
395
        auto t = ctx->type_reference();
×
396
        VerTypeParser tp(this);
×
397
        return tp.visitType_reference(t);
×
398
}
399
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryCall(
9,577✔
400
                sv2017Parser::PrimaryCallContext *ctx) {
401
        //     | primary ( DOT array_method_name )? ( attribute_instance )*
402
        //                   LPAREN ( list_of_arguments )? RPAREN
403
        //                   ( KW_WITH LPAREN expression RPAREN )? #PrimaryCall
404
        auto _p = ctx->primary();
9,577✔
405
        auto p = visitPrimary(_p);
9,577✔
406
        auto _amn = ctx->array_method_name();
9,577✔
407
        if (_amn) {
9,577✔
408
                NotImplementedLogger::print(
×
409
                                "VerExprPrimaryParser.visitPrimaryCall.array_method_name",
410
                                _amn);
411
                // auto amn = visitArray_method_name(_amn);
412
                // p = make_unique<HdlOp>(p, HdlOpType::DOT, amn);
413
        }
414
        if (ctx->KW_WITH())
9,577✔
UNCOV
415
                NotImplementedLogger::print(
×
416
                                "VerExprPrimaryParser.visitPrimaryCall.with", ctx);
417

418
        VerExprParser ep(this);
9,577✔
419
        vector<unique_ptr<iHdlExprItem>> args;
9,577✔
420
        auto loa = ctx->list_of_arguments();
9,577✔
421
        if (loa) {
9,577✔
422
                ep.visitList_of_arguments(loa, args);
8,268✔
423
                p = HdlOp::call(ctx, move(p), args);
8,268✔
424
        }
425
        VerAttributeParser(this).visitAttribute_instance(*p, ctx->attribute_instance());
9,577✔
426
        return p;
9,577✔
427
}
9,577✔
428

429
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryCallArrayMethodNoArgs(
8✔
430
                sv2017Parser::PrimaryCallArrayMethodNoArgsContext *ctx) {
431
        //     | primary DOT array_method_name               #PrimaryCallArrayMethodNoArgs
432

433
        auto _p = ctx->primary();
8✔
434
        auto p = visitPrimary(_p);
8✔
435
        auto _amn = ctx->array_method_name();
8✔
436
        NotImplementedLogger::print(
8✔
437
                        "VerExprPrimaryParser.visitPrimaryCallArrayMethodNoArgs.array_method_name",
438
                        _amn);
439
        // auto amn = visitArray_method_name(_amn);
440
        // p = make_unique<HdlOp>(move(p), HdlOpType::DOT, move(amn));
441

442
        VerExprParser ep(this);
8✔
443
        vector<unique_ptr<iHdlExprItem>> args;
8✔
444
        return HdlOp::call(ctx, move(p), args);
16✔
445
}
8✔
446

447
unique_ptr<iHdlExprItem> VerExprPrimaryParser::visitPrimaryCallWith(
3✔
448
                sv2017Parser::PrimaryCallWithContext *ctx) {
449
        //     | primary ( DOT array_method_name )? ( attribute_instance )*
450
        //              KW_WITH LPAREN expression RPAREN     #PrimaryCallWith
451

452
        auto _p = ctx->primary();
3✔
453
        auto p = visitPrimary(_p);
3✔
454
        auto _amn = ctx->array_method_name();
3✔
455
        if (_amn) {
3✔
456
                NotImplementedLogger::print(
×
457
                                "VerExprPrimaryParser.visitPrimaryCallWith.array_method_name",
458
                                _amn);
459
                // auto amn = visitArray_method_name(_amn);
460
                // p = make_unique<HdlOp>(p, HdlOpType::DOT, amn);
461
        }
462
        if (ctx->KW_WITH())
3✔
463
                NotImplementedLogger::print(
3✔
464
                                "VerExprPrimaryParser.visitPrimaryCallWith.with", ctx);
465

466
        VerExprParser ep(this);
3✔
467
        vector<unique_ptr<iHdlExprItem>> args;
3✔
468
        auto c = HdlOp::call(ctx, move(p), args);
3✔
469
        VerAttributeParser(this).visitAttribute_instance(*c, ctx->attribute_instance());
3✔
470
        return c;
6✔
471
}
3✔
472

473
}
474
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc