Minor: Property emission, move abstract check to template

Change-Id: Ib3149d4fd30ec7ca3f0fad986196b04599265e14
This commit is contained in:
Raphael Amiard
2016-05-03 12:24:31 +02:00
parent 5cacef78a6
commit 49cd205aec
2 changed files with 3 additions and 2 deletions

View File

@@ -1230,8 +1230,7 @@ class PropertyDef(AbstractNodeData):
with self.bind(), Self.bind_type(self.ast_node):
with names.camel_with_underscores:
self.prop_decl = render('properties/decl_ada')
self.prop_def = ('' if self.abstract else
render('properties/def_ada'))
self.prop_def = render('properties/def_ada')
base_prop = self.base_property()
if base_prop and base_prop.type:

View File

@@ -1,5 +1,6 @@
## vim: filetype=makoada
% if not property.abstract:
${"overriding" if property.overriding else ""} function ${property.name}
(${property.self_arg_name} :
access ${Self.type.name()}_Type${"" if property.dispatching else "'Class"}
@@ -35,3 +36,4 @@ begin
${property.constructed_expr.render_pre()}
return ${property.constructed_expr.render_expr()};
end ${property.name};
% endif