Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Dltk-dev] Re: code coloring in the js editor with regexp


  i don't see anything currently using it (i have all the projects checked out). if memory serves, i started to pull that code out based upon one of the ruby rules i found that did regexp matching, but then i needed to do something completely different b/c of perl's stupid syntax rules and the fact that

    s   /a/b/

  w/ the trailing spaces after the 's' is valid.

  look at the PerlQuoteAndRegExpPartitionRule in the perlipse project, you can see what i'm doing there. if you need any of that logic, we should probably make a base class and then i will refactor my code accordingly, otherwise if the logic in the ScriptRegExpRule works for you, then go ahead and use it.

On Fri, May 8, 2009 at 10:19 AM, Johan Compagner <jcompagner@xxxxxxxxx> wrote:
i just noticed:

public

abstract class ScriptRegExpRule extends PatternRule
 
Which project uses that (i dont have it all checked out)
 
Can a sub impl work for js?
 
johan


 
On Mon, May 4, 2009 at 16:14, Johan Compagner <jcompagner@xxxxxxxxx> wrote:
Hi,
 
dont know about other languages so i first ask if this is know or already working in other implementations.
If you have this:
 
 var myData = globals.curChartDataHTML.replace(/[^<]*(<a href="" '$5'); 
 var installdir = java.lang.System.getProperty("user.dir");
 installdir = utils.stringReplace(installdir,'\\','\/');
 
then the color coding in the script editor is wrong because it sees in the regexp a opening " without an ending so everything after that is marked as a string.
 
Do other scripting languages also work with regexp like that?
I guess i need to have a scanner that sees / xxx /g as there own thing?
 
johan
 


_______________________________________________
dltk-dev mailing list
dltk-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dltk-dev




--
-jae

Back to the top