| 203 | } |
| 204 | |
| 205 | Expression * ast_arrayComprehension ( yyscan_t scanner, const LineInfo & loc, vector<VariableNameAndPosition> * iters, |
| 206 | Expression * srcs, Expression * subexpr, Expression * where, const LineInfo & forend, bool genSyntax, bool tableSyntax ) { |
| 207 | auto pFor = new ExprFor(loc); |
| 208 | pFor->visibility = forend; |
| 209 | for ( const auto & np : *iters ) { |
| 210 | pFor->iterators.push_back(np.name); |
| 211 | pFor->iteratorsAka.push_back(np.aka); |
| 212 | if ( !np.aka.empty() ) { |
| 213 | das_yyerror(scanner,"array comprehension can't have an aka",np.at, |
| 214 | CompilationError::invalid_aka); |
| 215 | } |
| 216 | pFor->iteratorsAt.push_back(np.at); |
| 217 | pFor->iteratorsTupleExpansion.push_back(np.isTupleExpansion); |
| 218 | pFor->iteratorsTags.push_back(np.tag); |
| 219 | } |
| 220 | delete iters; |
| 221 | pFor->sources = sequenceToList(srcs); |
| 222 | auto pAC = new ExprArrayComprehension(loc); |
| 223 | pAC->generatorSyntax = genSyntax; |
| 224 | pAC->tableSyntax = tableSyntax; |
| 225 | pAC->exprFor = pFor; |
| 226 | pAC->subexpr = subexpr; |
| 227 | if ( where ) { |
| 228 | pAC->exprWhere = where; |
| 229 | } |
| 230 | return pAC; |
| 231 | } |
| 232 | |
| 233 | Structure * ast_structureName ( yyscan_t scanner, bool sealed, string * name, const LineInfo & atName, |
| 234 | string * parent, const LineInfo & atParent ) { |
no test coverage detected