| 131 | } |
| 132 | |
| 133 | Node node_find(Graph g, jsmntok_t *id) |
| 134 | { |
| 135 | /* Assumes id is a valid nodeid */ |
| 136 | int len1 = id->end-id->start; |
| 137 | Node n; |
| 138 | for (n = g->nodes; n; n = n->next) { |
| 139 | int len2 = n->id->end-n->id->start; |
| 140 | if (len1 == len2 && !strncmp(input+id->start, input+n->id->start, len1)) |
| 141 | return n; |
| 142 | } |
| 143 | return NULL; |
| 144 | } |
| 145 | |
| 146 | static Edge edge_create(void) |
| 147 | { |
no outgoing calls
no test coverage detected