lukeed/tidyPublic

feat: format handlebars

A port of bun's Rust port of Prettier's language-handlebars, with the
Handlebars lexer and grammar, simple-html-tokenizer, and the Glimmer
tree builder. It prints to the shared doc IR, and the style sheets
and YAML front matter go through the embed hook. The CLI and napi
pick it for .hbs and .handlebars files. Conformance: 116/116 of
Prettier's handlebars fixtures, and all 33 error fixtures fail.
LELuke Edwards authored
6665911Patch
Parent4f9eed9
14 files changed+4567-40
StackedSplit
crates/tidyrs/src/handlebars/ast.rs+303 −0
crates/tidyrs/src/handlebars/error.rs+82 −0
crates/tidyrs/src/handlebars/lexer.rs+463 −0
crates/tidyrs/src/handlebars/mod.rs+204 −0
crates/tidyrs/src/handlebars/parser.rs+943 −0
crates/tidyrs/src/handlebars/printer.rs+1195 −0
crates/tidyrs/src/handlebars/tokenizer.rs+1206 −0
crates/tidyrs/src/lib.rs+2 −0
crates/tidyrs/src/stack.rs+43 −0
crates/tidyrs/tests/handlebars.rs+14 −0
crates/tidyrs_cli/src/main.rs+78 −29
crates/tidyrs_napi/src/lib.rs+25 −6
notice.md+3 −2
tests/oracle/conformance.ts+6 −3