1 Replies Last post: Feb 12, 2010 9:01 PM by sky  
wallaby.pouch Novice 240 posts since
May 15, 2008
Currently Being Moderated

Jan 31, 2010 10:51 PM

Custom language: Can I postprocess the PSI tree?

Hi,

in my custom language plugin I need to treat certain areas of a file as "verbatim", i.e. the highlighting of tokens should be supressed.

 

1. Can I remove the textattributes of tokens somehow? This way the verbatim block does not contain the invalid highlighting of keywords found by the lexer.

 

or

 

2. Is there a way to postprocess a PSI tree to manually fix up the psi structure?

 

I can't do this in the lexer because the position of the verbatim areas are the result of parsing previous instructions.

 

Thanks a lot,

Wallaby

sky  Newbie 9 posts since
Jan 21, 2005
Currently Being Moderated
Feb 12, 2010 9:01 PM in response to: wallaby.pouch
Re: Custom language: Can I postprocess the PSI tree?

How about Annotator?

Idea calls it at a final stage of language processing, so you can change color, font, etc of the text in the editor.

 

Regards,

Serhiy

More Like This

  • Retrieving data ...