I did not heed the warning where 'only the path is guaranteed' when
listing open serial ports and made the assumption that the manufacturer
would be known (hint: it wasn't).
Rather than queuing inbound messages, the HubController now saves
pending promises/rejects for each pending request. Each inbound packet
is checked at the time of arrival, and if the ID matches a pending
response, the corresponding promise is called.
This fixes a problem where the longer the time between reads, the more
garbage responses queue up that are guaranteed to get thrown away the
next time the next response was gathered.
* Update parser
Implied nodes caused ambiguity when querying for context. Now every line
is considered, even blank lines, to make the process much, *much* easier.
* Update pylex tests
* Add runCursorContext
Refactor command registration
As we continue to register more commands for our extension,
'extensions.ts' has become gross and hard to read. Commands are now
defined in a `commands: Command[]` list in 'commands.ts':
type Command = {
name: string, // Name of the command e.g. 'mind-reader.selectTheme'
callback: () => void // Callback to register for the command
}
This list is imported into 'extension.ts' and registered
programatically, reducing the required lines of "extra" code required
to register commands in 'extension.ts' from 4 per command to 7 total.
This should help keep 'extension.ts' squeaky clean :)
The following commands adjust the font scale in the editor only:
- mind-reader.increaseFontScale
- mind-reader.decreaseFontScale
- mind-reader.resetFontScale
The following commands adjust the overall editor scale:
- mind-reader.increaseEditorScale
- mind-reader.decreaseEditorScale
- mind-reader.resetEditorScale