TypeNode* handleStencilCollection(TypeNode* type_expr) { EquelleType et = type_expr->type(); et.setStencil(true); TypeNode* tn = new TypeNode(et); tn->setLocation(type_expr->location()); delete type_expr; return tn; }
TypeNode* handleSequenceType(TypeNode* type_expr) { SequenceTypeNode* tn = new SequenceTypeNode(type_expr); tn->setLocation(FileLocation(yylineno)); return tn; #if 0 const EquelleType et = type_expr->type(); if (!et.isBasic()) { yyerror("cannot create a Sequence of non-basic types."); } TypeNode* node = new TypeNode(EquelleType(et.basicType(), Sequence, et.gridMapping(), et.subsetOf())); node->setLocation(FileLocation(yylineno)); return node; #endif }
TypeNode* handleArrayType(const int array_size, TypeNode* type_expr) { ArrayTypeNode* tn = new ArrayTypeNode(type_expr, array_size); tn->setLocation(FileLocation(yylineno)); return tn; #if 0 EquelleType et = type_expr->type(); if (et.isArray()) { yyerror("cannot create an Array of an Array."); return type_expr; } else { et.setArraySize(array_size); TypeNode* tn = new TypeNode(et); tn->setLocation(type_expr->location()); delete type_expr; return tn; } #endif }