⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 delphi-parser.js

📁 原名JSPackager
💻 JS
字号:
function DelphiParser(source){
  this.initialize(source);
}
$JSI.extend(DelphiParser,SourceParser);
//ECMAParser.prototype = new SourceParser();

DelphiParser.prototype.keywordsRegexp = SourceParser.buildKeywordsRegexp(
[
'abs','addr','and','ansichar','ansistring','array','as','asm','begin','boolean','byte','cardinal',
'case','char','class','comp','const','constructor','currency','destructor','div','do','double',
'downto','else','end','except','exports','extended','false','file','finalization','finally',
'for','function','goto','if','implementation','in','inherited','int64','initialization',
'integer','interface','is','label','library','longint','longword','mod','nil','not','object',
'of','on','or','packed','pansichar','pansistring','pchar','pcurrency','pdatetime','pextended',
'pint64','pointer','private','procedure','program','property','pshortstring','pstring',
'pvariant','pwidechar','pwidestring','protected','public','published','raise','real','real48',
'record','repeat','set','shl','shortint','shortstring','shr','single','smallint','string','then',
'threadvar','to','true','try','type','unit','until','uses','val','var','varirnt','while','widechar',
'widestring','with','word','write','writeln','xor'
]
);

DelphiParser.prototype.partitionsRegexp = SourceParser.buildPartitionsRegexp(
[
      '/\\(*(?:[^\\*]|\\*[^\\)])*\\*\\)'      //muti-comment (* *)
      ,'{[^\\r\\n][\\s\\S]*}'      //muti-comment { }
      ,'//.*$'                    //single-comment
      ,'/(?:\\\\.|[^/\\n\\r])+/'  //regexp
      ,"'(?:\\\\.|[^'\\n\\r])*'"  //string 
      ,'\\{\\$[a-zA-Z]+ .+\\}'    //directive Compiler Directives and Region tags
      ,'(?:\\b[\\d]+(?:\\.[\\d]+)?|\\$[a-fA-F0-9]+)\\b'//number
]);


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -