mirror of
https://github.com/eMoflon/model-modeling-language.git
synced 2024-06-03 02:31:48 +00:00
fixed deserializer template for attributes with default values of type string
This commit is contained in:
parent
bd0e82fb8d
commit
561aa43a94
|
@ -49,7 +49,7 @@ function deserializeAbstractClassEntity(ace: AbstractClassEntity, idStorage: Mml
|
|||
function deserializeAttribute(attribute: AttributeEntity, idStorage: MmlIdStorage): Generated {
|
||||
if (attribute.hasDefaultValue) {
|
||||
return toNode`
|
||||
attribute ${attribute.isEnumType ? idStorage.resolveId(attribute.type) : attribute.type} ${attribute.name} = ${attribute.isEnumType ? idStorage.resolveId(attribute.defaultValue as string) : attribute.defaultValue}${deserializeClassElementModifiers(attribute.modifiers, true)};
|
||||
attribute ${attribute.isEnumType ? idStorage.resolveId(attribute.type) : attribute.type} ${attribute.name} = ${attribute.isEnumType ? idStorage.resolveId(attribute.defaultValue as string) : attribute.type == "string" ? `"${attribute.defaultValue}"` : attribute.defaultValue}${deserializeClassElementModifiers(attribute.modifiers, true)};
|
||||
`;
|
||||
} else {
|
||||
return toNode`
|
||||
|
|
Loading…
Reference in a new issue