(node)
| 185 | return decoded[reference] |
| 186 | |
| 187 | def decode_node(node): |
| 188 | if 'constantValue' in node: |
| 189 | return node['constantValue'] |
| 190 | elif 'arrayValue' in node: |
| 191 | return [decode_node(x) for x in node['arrayValue']['values']] |
| 192 | elif 'dictionaryValue' in node: |
| 193 | return { |
| 194 | key: decode_node(x) |
| 195 | for key, x in node['dictionaryValue']['values'].items() |
| 196 | } |
| 197 | elif 'argumentReference' in node: |
| 198 | return customfunction.CustomFunction.variable( |
| 199 | None, node['argumentReference']) # pylint: disable=protected-access |
| 200 | elif 'functionDefinitionValue' in node: |
| 201 | return decode_function_definition(node['functionDefinitionValue']) |
| 202 | elif 'functionInvocationValue' in node: |
| 203 | return decode_function_invocation(node['functionInvocationValue']) |
| 204 | elif 'bytesValue' in node: |
| 205 | return _decodeValue({'type': 'Bytes', 'value': node['bytesValue']}, {}) |
| 206 | elif 'integerValue' in node: |
| 207 | return int(node['integerValue']) |
| 208 | elif 'valueReference' in node: |
| 209 | return lookup(node['valueReference'], 'reference') |
| 210 | return None |
| 211 | |
| 212 | def decode_function_definition( |
| 213 | defined: dict[str, Any], |
no test coverage detected