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

Function ast_forLoop

src/parser/parser_impl.cpp:1154–1172  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1152 }
1153
1154 Expression * ast_forLoop ( yyscan_t, vector<VariableNameAndPosition> * iters, Expression * srcs,
1155 Expression * block, const LineInfo & locAt, const LineInfo & blockAt,
1156 AnnotationArgumentList * annL ) {
1157 auto pFor = new ExprFor(locAt);
1158 pFor->visibility = blockAt;
1159 for ( const auto & np : *iters ) {
1160 pFor->iterators.push_back(np.name);
1161 pFor->iteratorsAka.push_back(np.aka);
1162 pFor->iteratorsAt.push_back(np.at);
1163 pFor->iteratorsTupleExpansion.push_back(np.isTupleExpansion);
1164 pFor->iteratorsTags.push_back(np.tag);
1165 }
1166 delete iters;
1167 pFor->sources = sequenceToList(srcs);
1168 pFor->body = block;
1169 if ( annL ) { pFor->annotations = move(*annL); delete annL; }
1170 ((ExprBlock *)block)->inTheLoop = true;
1171 return pFor;
1172 }
1173
1174 AnnotationArgumentList * ast_annotationArgumentListEntry ( yyscan_t, AnnotationArgumentList * argL, AnnotationArgument * arg ) {
1175 if ( arg->type==Type::none ) {

Callers 3

yyparseFunction · 0.85
yyparseFunction · 0.85
yyparseFunction · 0.85

Calls 2

sequenceToListFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected