语法突出显示是如何构建的? [英] How Is Syntax Highlighting Built?
本文介绍了语法突出显示是如何构建的?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我现在正在使用Lazarus构建一个开发人员编辑器,并且作为每个好的开发人员编辑器,它都需要突出显示语法,因此,我想了解一些事情:
I'm now building a developers editor using Lazarus and as every good developers editor, it needs to have a syntax highlighting, because of this that I want to know some things:
- 通常如何构建语法突出显示(使用许多
if
来更改TextField
上的字体? -
TSynEdit
真的很好吗? - 如何使用
TSynEdit
(链接和资源)?
- How is syntax highlight normally built(using many
if
s to change the font on aTextField
? TSynEdit
is very nice to do this?- How to use
TSynEdit
(links and resources)?
推荐答案
You can actually see an excellent example for yourself if you look at the editor for SharpDevelop. It's implemented in C# but uses great OOP that should be readily portable to other platforms or languages.
大多数自制语法突出显示工具都倾向于使用MS Windows RichText控件,但是它们通常又慢又笨拙,并且在添加大量代码时真的很慢.
Most home-brewed syntax highlighters tend to use the MS Windows RichText control but they're usually slow and clunky and really slow down when a lot of code is added.
这篇关于语法突出显示是如何构建的?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文