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

Function sequenceToList

src/parser/parser_impl.cpp:50–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

48 }
49
50 vector<ExpressionPtr> sequenceToList ( Expression * arguments ) {
51 vector<ExpressionPtr> argList;
52 if (arguments == nullptr) {
53 return argList;
54 }
55
56 ExpressionPtr arg = arguments; // `arguments` will be freed by smart ptr destructor
57 while ( arg->rtti_isSequence() ) {
58 auto pSeq = static_cast<ExprSequence*>(arg);
59 DAS_ASSERT(!pSeq->right->rtti_isSequence());
60 argList.push_back(pSeq->right);
61 arg = pSeq->left;
62 }
63 argList.emplace_back(arg);
64 reverse(argList.begin(),argList.end());
65 return argList;
66 }
67
68 vector<ExpressionPtr> typesAndSequenceToList ( vector<Expression *> * declL, Expression * arguments ) {
69 vector<ExpressionPtr> args;

Callers 8

yyparseFunction · 0.85
yyparseFunction · 0.85
typesAndSequenceToListFunction · 0.85
sequenceToTupleFunction · 0.85
parseFunctionArgumentsFunction · 0.85
ast_arrayComprehensionFunction · 0.85
ast_forLoopFunction · 0.85
yyparseFunction · 0.85

Calls 4

reverseFunction · 0.85
push_backMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected