> On 25 Feb 2018, at 21:30, Stephane Ducasse <[email protected]> wrote:
>
> Marcus I thought that the context was about to represent what the
> tools selected like the class currently selected.
> You have this information in the AST?
>
The AST as coming from the Parser: no. The AST after name Analysis: yes.
Which means you actually need the class to do name analysis (“Semantic
Analysis”,
implemented by OCASTSemanticAnalyzer).
I think it will be easy:
-> there is RubSmalltalkCodeMode / RubSmalltalkScriptingMode which models if
the editor.
is editing Doits or Methods (important for parsing!).
-> RubSmalltalkCodeMode does have an ivar classOrMetaclass already. It is not
set by most tools yet, though.
-> we can easily add there (or in RubSmalltalkEditor) an “ast “ ivar and
re-parse at every keystroke.
So as soon as we make sure that all users of RubSmalltalkCodeMode correctly set
the class, this will be all
very simple.
Marcus