I'm looking for a Delphi syntax highlighter written in Delphi, the equivalent of the online Javascript syntax highlighters like https://highlightjs.org/

I'm looking for a Delphi syntax highlighter written in Delphi, the equivalent of the online Javascript syntax highlighters like https://highlightjs.org/

(Ie, not something like SynEdit, an editor which does highlighting, but just something to put Delphi code into and get syntax highlighting information out of. I'd prefer even if it didn't do any drawing, just gave me the syntax highlighting info as abstract output.)

Any suggestions?

Importantly, I can't write something myself based on DelphiAST since I need to be able to feed in invalid Delphi code, eg code when someone has typed something that doesn't yet compile. Thus a highlighter, not a parser.
https://highlightjs.org

Comments

  1. TMS Software has a syntax highlighter memo.

    ReplyDelete
  2. I am using the TMS TAdvMemo with the TAdvSQLMemoStyler for an internal tool.  Works like a charm and with a little tweaking, it highlights the T-SQL code exactly like SSMS.

    It comes with stylers for INI, PHP, Perl, Pascal, Python, SQL, HTML, JS, and XML.

    ReplyDelete
  3. SynEdit is free and supports loads of languages out of the box.

    [Edit] okay saw the part now where you say not SynEdit, but I'd recommend looking under the hood. It's fairly easy to pull out all sorts of info. Alternatively just use the lexer.

    ReplyDelete

Post a Comment