- CYIdentifier *identifier(typed_->identifier_);
- typed_->identifier_ = NULL;
- return $ CYLexical(false, $B1($B(identifier, $ CYTypeExpression(typed_))));
+ return $ CYLexical(false, $B1($B(name_, $ CYTypeExpression(type_))));
+}
+
+CYTarget *CYTypeEnum::Replace(CYContext &context) {
+ CYList<CYProperty> properties;
+ CYForEach (constant, constants_)
+ properties->*$ CYPropertyValue($S(constant->name_->Word()), constant->value_);
+ CYObject *constants($ CYObject(properties));
+
+ if (specifier_ == NULL)
+ return $N1($V("Type"), constants);
+ else
+ return $C1($M(specifier_->Replace(context), $S("enumFor")), constants);