We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Some basic code that demonstrates modifying an AST.
Poking around, playing with various things, reading tests -- currently doing that.
An example could look something like this:
fn main() { let parse: rnix::Parse<rnix::Root> = rnix::Root::parse("\"hello world!\""); if !parse.errors().is_empty() { panic!(); } let syntax_node: rnix::SyntaxNode = parse.syntax(); // modify the ast and call `println!("Modified: {}", syntax_node_modified);` println!("Original: {}", syntax_node); }
The text was updated successfully, but these errors were encountered:
Related #151 (comment)
Sorry, something went wrong.
rust-analyzer has a good example for this https://github.com/rust-lang/rust-analyzer/blob/master/crates/syntax/src/ted.rs
I wonder if we should add an interface like that.
An example to modify the syntax tree would also be nice.
No branches or pull requests
Description
Some basic code that demonstrates modifying an AST.
Considered alternatives
Poking around, playing with various things, reading tests -- currently doing that.
Additional context
An example could look something like this:
The text was updated successfully, but these errors were encountered: