Supporting multiple languages in a single document

Milian Wolff mail at milianw.de
Mon Jun 7 10:01:23 UTC 2010


Jonathan Schmidt-Dominé - Developer, 07.06.2010:
> Hi!
> 
> Well, I'm not familiar with the structure of the duchain, but shouldn't it
> be enough if PHP-Support would treat everything between ?> and <? as a
> single token, JS everything between </script> and <script>, CSS everything
> between </style> and <style> etc. and they would not care about it,
> telling KDevelop nothing about highlighting, declarations etc. in this
> regions? There would be simply n independent parse-jobs for the languages.

I thought/hoped to have clarified that this is a nogo.

Think for example about this:

<?php // <script> NOT JAVSCRIPT BUT A PHP COMMENT </script> ?>

Or what about this:

<!-- <style> NOT CSS BUT A HTML COMMENT </style> -->

As you see, the child language would need to know about the lexical analysis 
of _every_ superseeding language. This is really a no-go, since it means lots 
of duplicated code and lots of maintanance effort.
-- 
Milian Wolff
mail at milianw.de
http://milianw.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20100607/aa374ca2/attachment.sig>


More information about the KDevelop-devel mailing list