Skip to content

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

@pedrooaugusto

Description

@pedrooaugusto

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    ParsingMay require some syntax analysis sutffenhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions