Stacksmith icon indicating copy to clipboard operation
Stacksmith copied to clipboard

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

Open uliwitness opened this issue 8 years ago • 0 comments

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 avatar May 05 '16 13:05 uliwitness