diff options
author | JinweiClarkChao <[email protected]> | 2014-09-23 22:34:14 +0800 |
---|---|---|
committer | Jinwei Zhao <[email protected]> | 2017-01-13 15:07:44 +0800 |
commit | b214f38d2c24a890ce36512a0c8bab965e27a508 (patch) | |
tree | 1522b651444407cbf120798e79be4657f1b472ab /Code/Blocks/syntax/scripts/shBrushPerl.js | |
parent | e13882d1656b143533cec307a19425e0a56ec999 (diff) | |
download | jinwei.me-b214f38d2c24a890ce36512a0c8bab965e27a508.tar.gz |
README
Diffstat (limited to 'Code/Blocks/syntax/scripts/shBrushPerl.js')
-rw-r--r-- | Code/Blocks/syntax/scripts/shBrushPerl.js | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/Code/Blocks/syntax/scripts/shBrushPerl.js b/Code/Blocks/syntax/scripts/shBrushPerl.js new file mode 100644 index 0000000..d94a2e0 --- /dev/null +++ b/Code/Blocks/syntax/scripts/shBrushPerl.js | |||
@@ -0,0 +1,72 @@ | |||
1 | /** | ||
2 | * SyntaxHighlighter | ||
3 | * http://alexgorbatchev.com/SyntaxHighlighter | ||
4 | * | ||
5 | * SyntaxHighlighter is donationware. If you are using it, please donate. | ||
6 | * http://alexgorbatchev.com/SyntaxHighlighter/donate.html | ||
7 | * | ||
8 | * @version | ||
9 | * 3.0.83 (July 02 2010) | ||
10 | * | ||
11 | * @copyright | ||
12 | * Copyright (C) 2004-2010 Alex Gorbatchev. | ||
13 | * | ||
14 | * @license | ||
15 | * Dual licensed under the MIT and GPL licenses. | ||
16 | */ | ||
17 | ;(function() | ||
18 | { | ||
19 | // CommonJS | ||
20 | typeof(require) != 'undefined' ? SyntaxHighlighter = require('shCore').SyntaxHighlighter : null; | ||
21 | |||
22 | function Brush() | ||
23 | { | ||
24 | // Contributed by David Simmons-Duffin and Marty Kube | ||
25 | |||
26 | var funcs = | ||
27 | 'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' + | ||
28 | 'chroot close closedir connect cos crypt defined delete each endgrent ' + | ||
29 | 'endhostent endnetent endprotoent endpwent endservent eof exec exists ' + | ||
30 | 'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' + | ||
31 | 'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' + | ||
32 | 'getnetbyname getnetent getpeername getpgrp getppid getpriority ' + | ||
33 | 'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' + | ||
34 | 'getservbyname getservbyport getservent getsockname getsockopt glob ' + | ||
35 | 'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' + | ||
36 | 'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' + | ||
37 | 'oct open opendir ord pack pipe pop pos print printf prototype push ' + | ||
38 | 'quotemeta rand read readdir readline readlink readpipe recv rename ' + | ||
39 | 'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' + | ||
40 | 'semget semop send setgrent sethostent setnetent setpgrp setpriority ' + | ||
41 | 'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' + | ||
42 | 'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' + | ||
43 | 'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' + | ||
44 | 'system syswrite tell telldir time times tr truncate uc ucfirst umask ' + | ||
45 | 'undef unlink unpack unshift utime values vec wait waitpid warn write'; | ||
46 | |||
47 | var keywords = | ||
48 | 'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' + | ||
49 | 'for foreach goto if import last local my next no our package redo ref ' + | ||
50 | 'require return sub tie tied unless untie until use wantarray while'; | ||
51 | |||
52 | this.regexList = [ | ||
53 | { regex: new RegExp('#[^!].*$', 'gm'), css: 'comments' }, | ||
54 | { regex: new RegExp('^\\s*#!.*$', 'gm'), css: 'preprocessor' }, // shebang | ||
55 | { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, | ||
56 | { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, | ||
57 | { regex: new RegExp('(\\$|@|%)\\w+', 'g'), css: 'variable' }, | ||
58 | { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, | ||
59 | { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } | ||
60 | ]; | ||
61 | |||
62 | this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags); | ||
63 | } | ||
64 | |||
65 | Brush.prototype = new SyntaxHighlighter.Highlighter(); | ||
66 | Brush.aliases = ['perl', 'Perl', 'pl']; | ||
67 | |||
68 | SyntaxHighlighter.brushes.Perl = Brush; | ||
69 | |||
70 | // CommonJS | ||
71 | typeof(exports) != 'undefined' ? exports.Brush = Brush : null; | ||
72 | })(); | ||