formatter: rewrite and refactor, address more edge-cases, begin documenting my work (#3096)

This commit is contained in:
Tyler Wilding
2023-10-20 21:24:31 -04:00
committed by GitHub
parent 94603bce49
commit dccc3da1b3
17 changed files with 670 additions and 476 deletions
+5
View File
@@ -96,6 +96,11 @@ void FormatterTree::construct_formatter_tree_recursive(const std::string& source
// formatting So for strings, we treat them as if they should be a single token
tree_node.refs.push_back(FormatterTreeNode(source, curr_node));
return;
} else if (curr_node_type == "quoting_lit") {
// same story for quoted symbols
// TODO - expect to have to add more here
tree_node.refs.push_back(FormatterTreeNode(source, curr_node));
return;
}
for (size_t i = 0; i < ts_node_child_count(curr_node); i++) {
const auto child_node = ts_node_child(curr_node, i);