Update Home
parent
e763794074
commit
0a5ce27027
2
Home.md
2
Home.md
@ -7,3 +7,5 @@ Here are some key ideas of how the plan will be accomplished.
|
||||
* The Husht syntax engine will be two-way: it should be able both to convert Husht syntax to fully correct Rust, but also take a Rust file and produce a Husht file with the same semantics. The Rust -> Husht -> Rust roundtrip should be basically equivalent to running `rustfmt` on the original file.
|
||||
* Implementation will start with Husht == Rust, and use the tree-sitter grammar for Rust to produce tree-sitter parse trees for "Husht" (=Rust) code, which will be transformed into essentially the same trees as rustc_parse would produce (in Rust's own ast structure), and then use the rustfmt code generator to produce Rust code. In the other direction, we will use rustc_parse itself, and likely use algorithms from the prettyplease pretty printer to convert that to a tree-sitter concrete syntax tree, from which it is of course easy to generate "Husht" code.
|
||||
* Once that roundtrip is working, we will fork and diverge the Husht tree-sitter parse from its starting point identical to the Rust tree-sitter parser, to implement the syntax that will make Husht a pleasure to use.
|
||||
|
||||
[Examples](Examples) will serve to guide the development of the Husht syntax.
|
||||
|
Loading…
Reference in New Issue
Block a user