Extend the syntax parsing/indenting code to give us a "context" for a certain offset. #84
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.
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).
The text was updated successfully, but these errors were encountered: