Skip to content

Add scope type parser piece of custom command grammar #2295

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

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

pokey
Copy link
Member

@pokey pokey commented Apr 16, 2024

Initial work towards #492; will be used to parse scope types in #2131

Exposes a function parseScopeType that can parse strings like funk, curly etc into their corresponding scope type payloads

Here's a railroad: https://deploy-preview-2295--cursorless.netlify.app/custom-command-railroad

Checklist

@pokey pokey changed the title Add scope type parser of custom command grammar Add scope type parser piece of custom command grammar Apr 16, 2024
@pokey pokey marked this pull request as draft April 16, 2024 18:30
@pokey pokey force-pushed the pokey/add-scope-type-parser-of-custom-command-grammar branch 3 times, most recently from 43395f8 to 64fbaea Compare April 16, 2024 18:34
Copy link
Member Author

@pokey pokey Apr 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

basically nothing changed in this file; just pulled out some utils from the keyboard parser to use for this new parser, and did slight renames to remove references to the word "keyboard"

@pokey pokey force-pushed the pokey/add-scope-type-parser-of-custom-command-grammar branch from 64fbaea to ba53a81 Compare April 16, 2024 18:36
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was the other half of packages/cursorless-engine/src/util/grammarHelpers.ts
the piece that is keyboard-specific

@pokey pokey marked this pull request as ready for review April 16, 2024 18:38
@pokey pokey force-pushed the pokey/add-scope-type-parser-of-custom-command-grammar branch 3 times, most recently from a546856 to e89aa20 Compare April 17, 2024 12:19
@pokey pokey force-pushed the pokey/add-scope-type-parser-of-custom-command-grammar branch from 6b3dc62 to 130f9b4 Compare April 19, 2024 15:45
@pokey
Copy link
Member Author

pokey commented Apr 21, 2024

@josharian This technically needs a review from you because it touches keyboard directory. The change there is completely incidental; I just moved some code out of there into the engine so we could use it for new custom command parser

@pokey pokey added this pull request to the merge queue Apr 22, 2024
Merged via the queue into main with commit d5be7e7 Apr 22, 2024
@pokey pokey deleted the pokey/add-scope-type-parser-of-custom-command-grammar branch April 22, 2024 12:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants