<div dir="ltr"><br clear="all"><a href="http://ik.homelinux.org/">http://ik.homelinux.org/</a><br>
<br><br><div class="gmail_quote">2010/6/4 Mattias Gärtner <span dir="ltr"><<a href="mailto:nc-gaertnma@netcologne.de">nc-gaertnma@netcologne.de</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Zitat von ik <<a href="mailto:idokan@gmail.com" target="_blank">idokan@gmail.com</a>>:<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Hello List,<br>
<br>
I've started last week to work on a Syntax highlighter for the Ruby language<br>
for SynEdit.<br>
You can find it here: <a href="http://github.com/ik5/SynEdit-syntaxes" target="_blank">http://github.com/ik5/SynEdit-syntaxes</a> .<br>
<br>
I have many things I do not understand in the highlighter issue.<br>
For example how to create the ident (I've looked at the sources of other<br>
languages, yet I do not understand how it's been done).<br>
</blockquote>
<br></div>
What do you mean with "ident"?</blockquote><div><br><br>Identifiers.<br> </div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">
<br>
<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
This is one of the things I require help at the moment to understand.<br>
<br>
How do I make the folding issues ?<br>
</blockquote>
<br></div>
See TSynPasSyn. Search for everything containing the word "fold".<br>
Basically:<br>
- define an enum for every fold block type (see TPascalCodeFoldBlockType).<br>
- define a range class (for example TSynRubySynRange, you can copy TSynPasSynRange and rename all Pas in Ruby). The range class is needed to store the code fold state for every line of synedit. (all lines with the same state share the same range object).<br>
Martin, maybe some parts can be moved to a TSynCustomHighlighterFoldedRange?<br>
- then see all overrides in TSynPasSyn. I guess Ruby will do many things similar, just with other enums and keywords.<br>
<br>
Maybe Martin can give a small paragraph, how the store/restore of code fold ranges work. Then we can put that all together and put into a wiki page.<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
And the list goes on (I'll ask it when I'll need to implement it, when I do<br>
not understand).<br>
<br>
This beginning of working for it, started because I think Lazarus is a great<br>
IDE, and it should support additional programming languages (For now non GUI<br>
development). Because I use Ruby a lot, and we do not have any Syntax<br>
Highlighter for it, I decided to try and make Lazarus to support Ruby at<br>
first.<br>
</blockquote>
<br></div>
Great.<div class="im"><br>
<br>
<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
If any of you think also that Lazarus should support additional languages as<br>
part of the IDE (not only the coloring of the syntax that is), I will be<br>
glad if people will help me in this manner.<br>
</blockquote>
<br></div>
Yes.<br>
I already started a few things. For example you can register your own identifier completion. I plan to support other compilers too.<br>
<br>
<br>
Mattias<br><font color="#888888">
<br>
<br>
<br>
<br>
--<br>
_______________________________________________<br>
Lazarus mailing list<br>
<a href="mailto:Lazarus@lists.lazarus.freepascal.org" target="_blank">Lazarus@lists.lazarus.freepascal.org</a><br>
<a href="http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus" target="_blank">http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus</a><br>
</font></blockquote></div><br></div>