sf_afmt/
lib.rs

1mod accessor;
2pub mod args;
3mod context;
4mod data_model;
5mod doc;
6mod doc_builder;
7mod enum_def;
8pub mod formatter;
9pub mod message_helper;
10mod utility;
11use formatter::Formatter;
12
13pub fn format(f: Formatter) -> Vec<Result<String, String>> {
14    f.format()
15}
16
17//#[wasm_bindgen]
18//pub fn greet(source_code: &str) -> String {
19//    let config = Config::default();
20//    Formatter::format_one(source_code, config)
21//}
22
23//#[wasm_bindgen]
24//pub fn greet(source_code: &str) -> String {
25//    "hello".to_string()
26//}
27
28//#[wasm_bindgen]
29//pub fn greet() -> Result<String, JsValue> {
30//    Ok("hello world!".to_string())
31//}