TypeDeclNode tDecl = (TypeDeclNode) type;
return createSequenceType(tDecl.getType());
}
case SEQUENCE_TYPE: {
SequenceTypeNode sType = (SequenceTypeNode) type;
if (sType.getItemType() == null) {
return SequenceType.create(AnyItemType.INSTANCE, Quantifier.QUANT_STAR);
}
TypeQuantifier tq = sType.getQuantifier();
Quantifier q = Quantifier.QUANT_ONE;
if (tq != null) {
switch (tq) {
case QUANT_QUESTION:
q = Quantifier.QUANT_QUESTION;
break;
case QUANT_PLUS:
q = Quantifier.QUANT_PLUS;
break;
case QUANT_STAR:
q = Quantifier.QUANT_STAR;
break;
}
}
ItemType iType = createItemType(sType.getItemType());
return SequenceType.create(iType, q);
}
case EMPTY_SEQUENCE_TYPE: {
return SequenceType.create(EmptySequenceType.INSTANCE, Quantifier.QUANT_ZERO);