lukeed/tidyPublic

feat: parse YAML as yaml does

Ports the lexer, the concrete syntax tree parser and the composer
of yaml 2.9.0, which Prettier parses YAML with. The tree matches
yaml's on 1,382 of 1,383 inputs, the YAML Test Suite and the
files under ~/repos/oss, and differs only in the text of an error.
What the composer accepts matches Prettier on all of them.
LELuke Edwards authored
fececc0Patch
Parent9e88f4b
15 files changed+4119-2
StackedSplit
Cargo.toml+1 โˆ’1
bun.lock+6 โˆ’0
crates/tidy/src/lib.rs+1 โˆ’0
crates/tidy/src/syntax.rs+18 โˆ’0
crates/tidy/src/yaml/compose.rs+1210 โˆ’0
crates/tidy/src/yaml/cst.rs+1283 โˆ’0
crates/tidy/src/yaml/lexer.rs+627 โˆ’0
crates/tidy/src/yaml/mod.rs+37 โˆ’0
crates/tidy/src/yaml/scalar.rs+393 โˆ’0
package.json+3 โˆ’1
tests/oracle/yaml/Cargo.lock+160 โˆ’0
tests/oracle/yaml/Cargo.toml+9 โˆ’0
tests/oracle/yaml/accepts.ts+39 โˆ’0
tests/oracle/yaml/cst.ts+28 โˆ’0
tests/oracle/yaml/src/main.rs+304 โˆ’0