Nesting languages

Questions on using RSyntaxTextArea should go here.

Moderator: robert

Nesting languages

Postby schulz » Tue Aug 14, 2012 9:26 am

Hi,

I just stumbled about RSyntaxTextArea recently. We are looking for a Java-component just like that (supporting syntax highlighting, code-templates, auto-completion) for supporting our (proprietary, closed) templating syntax. One issue is that in a template multiple languages get mixed in as well, e.g., HTML, JSP, Javascript, etc. So I wonder, if RSTA supports nesting of languages in some way. I somewhere read that it is highlighting CSS within HTML, would this be CSS syntax included in the HTML scanner or does RSTA somehow switch between the languages?

Thanks,
Stefan
schulz
 
Posts: 3
Joined: Tue Aug 14, 2012 8:51 am
Location: Dortmund, Germany

Re: Nesting languages

Postby robert » Wed Aug 15, 2012 3:11 am

Unfortunately, RSTA cannot delegate between lexers for different languages. File types with lots of "languages," such as PHP (containing HTML, JS, CSS) need to be able to tokenize all "languages" in a single TokenMaker.
User avatar
robert
 
Posts: 791
Joined: Sat May 10, 2008 5:16 pm

Re: Nesting languages

Postby schulz » Wed Aug 15, 2012 10:56 am

Thanks for clarifying. Although, this makes RSTA less comfortable an extension for our purpose. :(
schulz
 
Posts: 3
Joined: Tue Aug 14, 2012 8:51 am
Location: Dortmund, Germany

Re: Nesting languages

Postby robert » Wed Aug 15, 2012 1:09 pm

No worries. I'll be happy to help with any specific problems you have if you choose to build something with RSTA. Just post questions here in the forum, or message me.
User avatar
robert
 
Posts: 791
Joined: Sat May 10, 2008 5:16 pm


Return to Help

Who is online

Users browsing this forum: No registered users and 3 guests

cron