I am creating a programmable piece of software. The idea was to allow end users to manage the host system through some scenarios. Consequently, the software comes with a script editor for which I am using RSyntaxTextArea . Everything is good here.
As a final touch, I thought about adding a kind of IntelliSense to the script (the script is Rhino ), and I donβt have the best way to implement this (at least to some extent).
To get started, I started with this amateurish approach:
- Symbol
- . (period) invokes the entire proposal process.
- The contents of the script (excluding the current statement) is * eval * uated and from which I identify the variables / functions defined so far and their type. Suggestions are based on this.
Instead of evaluating the script (which is premature), I am thinking of creating an AST . Is this right? Do you have any suggestions / links / algorithms, etc.? How to handle the case when the current state of the script does not compile? Please advice.
source
share