The value inside a flow_node: its first named child that is not an anchor (`&name`), a tag (`!!str`) or a comment, all of which precede the value.
| 78 | // The value inside a flow_node: its first named child that is not an anchor |
| 79 | // (`&name`), a tag (`!!str`) or a comment, all of which precede the value. |
| 80 | static TSNode flow_node_value(TSNode node) { |
| 81 | uint32_t n = ts_node_named_child_count(node); |
| 82 | for (uint32_t i = 0; i < n; i++) { |
| 83 | TSNode child = ts_node_named_child(node, i); |
| 84 | const char *type = ts_node_type(child); |
| 85 | if (strcmp(type, "anchor") != 0 && strcmp(type, "tag") != 0 && |
| 86 | strcmp(type, "comment") != 0) { |
| 87 | return child; |
| 88 | } |
| 89 | } |
| 90 | TSNode null_node = {0}; |
| 91 | return null_node; |
| 92 | } |
| 93 | |
| 94 | // Return the raw source text for a scalar node (plain, single-quoted, or |
| 95 | // double-quoted). Surrounding quote characters are stripped for quoted forms. |
no outgoing calls
no test coverage detected