Skip to content
New issue

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

Allow VSCode to show parsing output same as pest.rs website. #31

Open
actengage opened this issue Jun 26, 2023 · 2 comments
Open

Allow VSCode to show parsing output same as pest.rs website. #31

actengage opened this issue Jun 26, 2023 · 2 comments
Labels
enhancement New feature or request javascript Pull requests that update Javascript code vscode

Comments

@actengage
Copy link

actengage commented Jun 26, 2023

Disclosure, I'm senior engineer but new to Rust (using Pest.rs to learn Rust). Currently I am porting my logic from Peggy.js into Rust so I run the code with a CLI or WASM without the need for a Node runtime. I'm no doubt doing things incorrectly being new to Rust, but here is my process. As far as I can tell, the VSCode extension just validate, highlight, and help with the writing syntax. Since I'm new to Rust, I currently I find myself using the Pest.rs website to quickly create complex grammars and check the parse tree, then write the code in Rust to do what i need on the AST.

Or is this just the wrong approach entirely? Is there a way to do use Rust Analyzer and the compiler to do what I'm doing on the website?

Feature Request:

Assuming I'm not overlooking the obvious, It would be great if I could just use VSCode to define some my grammar, my input string, and get the same parse tree output on pest.rs inside of VSCode. Perhaps its in the output tab in the console, or perhaps its like markdown previews work and I can split screen with the editor on one side, and preview on the other. Parsing errors of course would still do the same thing it does now.

PS, I love the Pest.rs parser and website. Very well done. It happened to be the perfect excuse to learn Rust and starting to replace Node with better tools.

@actengage actengage added the enhancement New feature or request label Jun 26, 2023
@Jamalam360
Copy link
Contributor

This was on my personal radar but didn't have a specific issue. I think it can be done, just not sure what the best UI for it is yet

@Jamalam360 Jamalam360 added vscode javascript Pull requests that update Javascript code labels Jun 26, 2023
@actengage
Copy link
Author

Cool, thanks for the reply. The UI is definitely a bit of a challenge inside VSCode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request javascript Pull requests that update Javascript code vscode
Projects
None yet
Development

No branches or pull requests

2 participants