(self, cfunction: CFunction)
| 390 | return [self.substitute(w, result=result) for w in self.write] |
| 391 | |
| 392 | def add_to_cfunction(self, cfunction: CFunction) -> None: |
| 393 | for t, name in self.cparams: |
| 394 | if t.startswith('...'): |
| 395 | cfunction.add_vlist(name) |
| 396 | else: |
| 397 | cfunction.add_param(self.substitute(t), self.substitute(name)) |
| 398 | if self.bad_param_check: |
| 399 | msg = 'Bad parameter {name}: {msg}'.format( |
| 400 | name=self.name, msg=self.bad_param_check.msg) |
| 401 | cfunction.add_statement('if ({cond}) {body}'.format( |
| 402 | cond=self.substitute(self.bad_param_check.cond), |
| 403 | body=bad_param_error(msg))) |
| 404 | |
| 405 | |
| 406 | def template_var(s: str) -> str: |
no test coverage detected