📄 delphi-parser.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 + -