Is it possible to use ProgrammaticLexicalScope inside a dynamic language?
I want to use it for an implementation of conditional compilation blocks.
Another possible solution will be to use the sematic parsing for that if it possible.
Is it possible to use ProgrammaticLexicalScope inside a dynamic language?
I want to use it for an implementation of conditional compilation blocks.
Another possible solution will be to use the sematic parsing for that if it possible.
Hi Erel,
I think that dynamic languages will run into problems if non-DynamicLexicalScopes are used. What sort of features are you trying to achieve in relation to conditional compilation blocks?
I want to to change the color of inactive code.
For example:
#if DEBUG
...
#else
//code should be gray
#endif
I can update the language when the active conditions change however I don't know how (or whether it is possible) to implement #else and #elseif.
The language is a dynamic language.
Hi Erel,
You might have better luck using span indicators. With those you can alter the foreground and background of text and it would occur separately from the main lexing, so you don't need to worry about modifying the lexer that way. You could have your span indicator ranges change the text foreground to be dimmer.
Thank you. It is a great idea. We will try it.
Please log in to a validated account to post comments.