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

Integrate a PL parser to offer context specific voice commands #2

Open
pedrooaugusto opened this issue Sep 21, 2021 · 0 comments
Open
Labels
enhancement New feature or request Parsing May require some syntax analysis sutff

Comments

@pedrooaugusto
Copy link
Owner

Description

Voice commands such as add continue statement should be context specific, in the sense that the continue keyword is only allowed inside a loop statement (while, do...whie and for). This can be achieved by using a parser to read and make sense of the surrounds before the command execution.

In the snippet below, where the mouse is in line 3, a valid command could be invert the conditional statement and that would transform value > 112 in !(value > 112), but before doing that we need to know that in line 3 we have a JavaScript conditional statement and not some random piece of text. This can be achieved with JS parsers such as Esprima and Reflect.js

1 const value = 7 * 42
2
3 if (value > 112) { | // <- mouse cursor is here!
4 ...

The aim of this issue is to use a programming language parser to make sense of the surrounds in order to offer context specific voice commands.

@pedrooaugusto pedrooaugusto added enhancement New feature or request Parsing May require some syntax analysis sutff labels Sep 21, 2021
@pedrooaugusto pedrooaugusto pinned this issue Sep 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Parsing May require some syntax analysis sutff
Projects
None yet
Development

No branches or pull requests

1 participant