Skip to content

Commit fe13110

Browse files
committed
rustell readme
1 parent 8f1de34 commit fe13110

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

rust/rustell/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Rustell
2+
3+
Rustell is a development tool for Rust, designed for users who are not accustomed to using the semicolon (";") as a statement separator - for example, developers coming from languages like Haskell.
4+
5+
Its usage is similar to "rustfmt": Rustell reads Rust source code (which may omit some required semicolons) from standard input ("stdin") and produces corrected output with all necessary semicolons inserted through standard output ("stdout"). It is intended to be used as a text editor plugin, typically invoked right before running "rustfmt".
6+
7+
Rustell is implemented as a partial Rust parser. It parses only those parts of the code that depend on semicolons, such as "use", "mod", and "let" statements, as well as statements inside "{ ... }" code blocks (excluding the final statement in a block). Rustell converts these expressions into an internal AST, consuming any existing semicolons if present. Code that does not belong to these statements is left untouched and represented as a special "other" node type within the AST.
8+
9+
Finally, Rustell renders its AST back into Rust source code, appending semicolons where required while preserving "other" nodes exactly as they appeared in the original input.

0 commit comments

Comments
 (0)