Hello
I am trying to make a python code editor that highlights keywords, operators and strings.
The problem of course is with the quotes as Python supports single, double and triple quotes for strings.
Ex:
x = 'some text'
x = "some text"
x = '''some text'''
Also i can't find a way to go back and modify my "script" in the field.
I tried with pass keyDown but it doesn't work well
How would you approach the problem ?
Thanks
Syntax highlighter
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Syntax highlighter
- Attachments
-
- highlight.rar
- (1.39 KiB) Downloaded 196 times
Re: Syntax highlighter
Hi.
Triple quotes? Is that a single char, or a single and a double quote stuck together? The itemDelimiter can be set to any char, and in v.7 (I believe) the itemDel can be a string of any length.
Does this help? If the itemDel can be of any length, I suppose it can be set to a string consisting of a single and a double quote. Now you should be able to parse your data.
Craig Newman
Triple quotes? Is that a single char, or a single and a double quote stuck together? The itemDelimiter can be set to any char, and in v.7 (I believe) the itemDel can be a string of any length.
Does this help? If the itemDel can be of any length, I suppose it can be set to a string consisting of a single and a double quote. Now you should be able to parse your data.
Craig Newman