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

Extend the syntax parsing/indenting code to give us a "context" for a certain offset. #84

Open
uliwitness opened this issue May 5, 2016 · 0 comments
Labels
editor Script editor windows, tool palettes, Project Canvas, Info popovers, and the menu bar used for them. interpreter Hammer programming language: Parser, tokenizer, interpreter.

Comments

@uliwitness
Copy link
Owner

This is mostly the code in LEODisplayInfoTableCreateForParseTree(). By being able to give a context, we could pre-fill autocompletions with sensible values depending on where your cursor is right now. It might also be good metadata to have when updating the display info while the user edits the text.

E.g. we could have contexts "toplevel" (completes to documentation comments, function definition, handler definition), "in-handler" (completes to commands, global declarations), "parameter" (completes to values and expressions).

In addition, we know what kind of object we are in, so we could filter out messages that don't make sense (like "stopMovie" only gets sent to a movie player and then passed up the message path to background, card, stack and project, so no use to offer that method in a field or button's script).

@uliwitness uliwitness added editor Script editor windows, tool palettes, Project Canvas, Info popovers, and the menu bar used for them. interpreter Hammer programming language: Parser, tokenizer, interpreter. labels Mar 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
editor Script editor windows, tool palettes, Project Canvas, Info popovers, and the menu bar used for them. interpreter Hammer programming language: Parser, tokenizer, interpreter.
Projects
None yet
Development

No branches or pull requests

1 participant