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

Don't suggest keywords which are invalid in a program #34

Closed
ojwb opened this issue Nov 30, 2020 · 4 comments
Closed

Don't suggest keywords which are invalid in a program #34

ojwb opened this issue Nov 30, 2020 · 4 comments
Labels
enhancement New feature or request

Comments

@ojwb
Copy link
Contributor

ojwb commented Nov 30, 2020

Some keywords don't work in a program so it's not helpful to suggest them as completions.

It seems the list is AUTO, LIST, RENUMBER, NEW, OLD, LOAD, SAVE but I may have missed some (or contexts where some of those work). (Note CHAIN and RUN are valid in a program.)

@mattgodbolt mattgodbolt added the enhancement New feature or request label Nov 30, 2020
@mattgodbolt
Copy link
Owner

Right! These are easy enough to do. Moving forward suggesting PRINT halfway through a line should be avoided too. I think we get some clues for those in the "flags" of the tokenisation table (which we parse but don't use yet). e.g. http://www.benryves.com/bin/bbcbasic/manual/Appendix_Tokeniser.htm stuff in there we aren't yet using.

@ojwb
Copy link
Contributor Author

ojwb commented Nov 30, 2020

Those flags seem very useful. Looking at that table, DELETE is missing from my original list.

ojwb added a commit to ojwb/owlet-editor that referenced this issue Feb 20, 2022
These immediate commands aren't valid in a program.

Fixes mattgodbolt#34
@ojwb
Copy link
Contributor Author

ojwb commented Feb 20, 2022

I've opened a PR to fix my original report and new issue #82 for Matt's suggestion to be context sensitive.

ojwb added a commit to ojwb/owlet-editor that referenced this issue Feb 20, 2022
These immediate commands aren't valid in a program.

Fixes mattgodbolt#34
@mattgodbolt
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants