mirror of
https://github.com/open-goal/jak-project.git
synced 2024-10-20 11:26:18 -04:00
18 lines
363 B
C
18 lines
363 B
C
|
#pragma once
|
||
|
|
||
|
#include <string>
|
||
|
|
||
|
#include "tree_sitter/api.h"
|
||
|
|
||
|
namespace formatter {
|
||
|
struct TreeSitterParserDeleter {
|
||
|
void operator()(TSParser* ptr) const { ts_parser_delete(ptr); }
|
||
|
};
|
||
|
|
||
|
struct TreeSitterTreeDeleter {
|
||
|
void operator()(TSTree* ptr) const { ts_tree_delete(ptr); }
|
||
|
};
|
||
|
|
||
|
std::string format_code(const std::string& source);
|
||
|
} // namespace formatter
|