pub fn tergo_format(
input: &str,
config: Option<&Config>,
) -> Result<String, String>
Expand description
Format the input code with the given configuration.
§Arguments
input
- The input code to format.config
- The configuration to use for formatting. If not provided, the default configuration will be used. An instance of Config.
§Returns
The formatted code.
§Example
use tergo_lib::tergo_format;
use tergo_lib::Config;
let input = "a <- function(x, y){x+y}";
let config = Config::default();
let formatted = tergo_format(input, Some(&config)).unwrap();