(arguments)
| 264 | |
| 265 | |
| 266 | def generateArgs(arguments): |
| 267 | if len(arguments.posonlyargs) != 0: |
| 268 | raise Exception('Unsupported: postion-only arguments') |
| 269 | if arguments.vararg or arguments.kwarg: |
| 270 | raise Exception('Unsupported: *args and **kwargs function arguments') |
| 271 | if len(arguments.kwonlyargs) != 0: |
| 272 | raise Exception('Unsupported: Keyword-only arguments') |
| 273 | if len(arguments.defaults) != 0: |
| 274 | raise Exception('Unsupported: Default values for function arguments') |
| 275 | return [SplootNode('PY_IDENTIFIER', {}, {'identifier': a.arg}) for a in arguments.args] |
| 276 | |
| 277 | def generateFunction(func): |
| 278 | return SplootNode('PYTHON_FUNCTION_DECLARATION', { |
no test coverage detected