Find all template variables in self._code, excluding the function name.
(self)
| 401 | # Private methods |
| 402 | |
| 403 | def _parse_template_vars(self): |
| 404 | """Find all template variables in self._code, excluding the function name.""" |
| 405 | template_vars = set() |
| 406 | for var in parsing.find_template_variables(self._code): |
| 407 | var = var.lstrip('$') |
| 408 | if var == self.name: |
| 409 | continue |
| 410 | if var in ('pre', 'post'): |
| 411 | raise ValueError('GLSL uses reserved template variable $%s' % |
| 412 | var) |
| 413 | template_vars.add(var) |
| 414 | return template_vars |
| 415 | |
| 416 | def _get_replaced_code(self, names, version, shader): |
| 417 | """Return code, with new name, expressions, and replacements applied.""" |