Exemple #1
0
 def _render_pre(self):
     from langkit.compile_context import get_context
     return '{}\n{}'.format(
         self.unit_expr.render_pre(),
         render('properties/null_safety_check_ada',
                expr=self.unit_expr,
                result_var=self.prefix_var)
         if not get_context().no_property_checks else '')
Exemple #2
0
 def _render_pre(self):
     # Before accessing the field of a record through an access, we must
     # check whether this access is null in order to raise a
     # Property_Error in the case it is.
     return '{}\n{}'.format(
         render('properties/null_safety_check_ada',
                expr=self.receiver_expr, result_var=self.prefix_var),
         '\n'.join(arg.render_pre() for arg in self.arguments)
     )
Exemple #3
0
 def _render_pre(self):
     from langkit.compile_context import get_context
     # Before accessing the field of a record through an access, we must
     # check whether this access is null in order to raise a
     # Property_Error in the case it is.
     return '{}\n{}'.format(
         render('properties/null_safety_check_ada',
                expr=self.receiver_expr, result_var=self.prefix_var)
         if not get_context().no_property_checks
         else '',
         '\n'.join(arg.render_pre() for arg in self.arguments)
     )
Exemple #4
0
 def _render_pre(self):
     return render('properties/quantifier_ada',
                   quantifier=self,
                   ALL=Quantifier.ALL,
                   ANY=Quantifier.ANY,
                   Name=names.Name)
Exemple #5
0
 def _render_pre(self):
     return render('properties/map_ada', map=self, Name=names.Name)
Exemple #6
0
 def _render_pre(self):
     return render('properties/then_ada', then=self)
Exemple #7
0
 def _render_pre(self):
     return render('properties/if_ada', expr=self)
Exemple #8
0
 def _render_pre(self) -> str:
     return render("properties/find_ada", find=self)
Exemple #9
0
 def _render_pre(self):
     return render('properties/domain_ada',
                   expr=self,
                   sloc_info_arg=sloc_info_arg(self.abstract_expr.location))
Exemple #10
0
 def _render_pre(self):
     return render('properties/then_ada', then=self)
Exemple #11
0
 def _render_pre(self):
     return render('properties/if_ada', expr=self)
Exemple #12
0
 def _render_pre(self):
     # Before actually downcasting an access to an AST node, add a type
     # check so that we raise a Property_Error if it's wrong.
     return render('properties/type_safety_check_ada', expr=self)
Exemple #13
0
 def _render_pre(self):
     return (super(New.NodeExpr, self)._render_pre() +
             render('properties/new_astnode_ada', expr=self))
Exemple #14
0
 def _render_pre(self):
     # Before actually downcasting an access to an AST node, add a type
     # check so that we raise a Property_Error if it's wrong.
     return render('properties/type_safety_check_ada', expr=self)
Exemple #15
0
 def _render_pre(self):
     return render(
         'properties/quantifier_ada', quantifier=self,
         ALL=Quantifier.ALL, ANY=Quantifier.ANY, Name=names.Name
     )
Exemple #16
0
 def _render_pre(self):
     return render('properties/map_ada', map=self, Name=names.Name)