abap语法_ABAP代码语法突出显示

abap语法_ABAP代码语法突出显示

abap语法

Just finished and eager to share - I added a new syntax definition to the Text_Highlighter PEAR package (see also here). It's for highlighting code written in the SAP's own ABAP programming language.

刚刚结束并渴望分享-我在Text_Highlighter PEAR包中添加了新的语法定义(另请参见此处 )。 它用于突出显示用SAP自己的ABAP编程语言编写的代码。

A live demo is available at the hiliteme.com site, just pick ABAP from the drop-down of programming languages. Any feedback is appreciated, because it's a brand new thing and may have bugs or incompletenesses (is that a word?). So feel free to highlight your ABAP code and post it to blogs or forums.

您可以在hiliteme.com网站上获得现场演示,只需从编程语言的下拉菜单中选择ABAP。 感谢您提供任何反馈意见,因为这是一个全新的事物,并且可能存在错误或不完整(这是一个单词吗?)。 因此,随时突出显示您的ABAP代码并将其发布到博客或论坛中

The implementation wasn't hard, the Text_Highlighter package is made to be extended and even provides the tools for that. All you need to do is create an XML file that contains keywords and other syntax rules, such as formats of the comments and so on. Then there is a command line tool that takes the XML file and generates a class out of it. The class is later on used when highlighting. Here's the XML file in case you want to improve on it and generate your own ABAP.php class:

实现起来并不难,可以扩展Text_Highlighter包,甚至可以提供用于实现此目的的工具。 您需要做的就是创建一个包含关键字和其他语法规则(例如注释格式等)的XML文件。 然后是一个命令行工具,该工具获取XML文件并从中生成一个类。 稍后在突出显示时使用该类。 这是XML文件,以备您需要改进并生成自己的ABAP.php类:

Tell your friends about this post on Facebook and Twitter

FacebookTwitter上告诉您的朋友有关此帖子的信息

翻译自: https://www.phpied.com/abap-code-syntax-highlighting/

abap语法