(data, builtin_docs, sploot_nodes)
| 89 | |
| 90 | |
| 91 | def processEntry(data, builtin_docs, sploot_nodes): |
| 92 | if type(data) == dict and 'category' in data: |
| 93 | return processCategory(data, builtin_docs, sploot_nodes) |
| 94 | |
| 95 | if type(data) != str: |
| 96 | raise Exception(f'{data} is not a string. If not a category, then all entries should be strings.') |
| 97 | |
| 98 | key = data |
| 99 | |
| 100 | components = key.split('.') |
| 101 | if components[0] == 'sploot-node': |
| 102 | if components[1] in sploot_nodes: |
| 103 | return sploot_nodes[components[1]] |
| 104 | elif components[0] == 'builtins': |
| 105 | if len(components) == 2: |
| 106 | # A builtin value or function |
| 107 | return get_entry_for_builtin_value(key, components[1], builtin_docs) |
| 108 | elif len(components) == 3: |
| 109 | return get_entry_for_builtin_attr(key, components[1], components[2], builtin_docs) |
| 110 | |
| 111 | raise Exception(f'Unsupported entry key: {key}') |
| 112 | |
| 113 | |
| 114 | def generate_sploot_node_docs(): |
no test coverage detected