コード例 #1
0
 EquelleType type() const
 {
     EquelleType t = SymbolTable::getFunction(funcname_).returnType(funcargs_->argumentTypes());
     if (dsr_ != NotApplicable) {
         assert(t.isEntityCollection());
         return EquelleType(t.basicType(), Collection, dsr_, t.subsetOf(), t.isMutable(), t.isDomain());
     } else {
         return t;
     }
 }
コード例 #2
0
ファイル: ParseActions.cpp プロジェクト: atgeirr/equelle
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
}