diff options
author | ramverma <ram.krishna.verma@ericsson.com> | 2018-07-13 12:32:32 +0100 |
---|---|---|
committer | ramverma <ram.krishna.verma@ericsson.com> | 2018-07-13 16:07:05 +0100 |
commit | 08b595c863b45e759e57ef419c83dad2b209df9c (patch) | |
tree | 02f9c3e7c74e5b1242d4a04c21ade4e4ea501063 /client/client-editor/src/main/resources/webapp/js/edit_area/reg_syntax/perl.js | |
parent | 7fbb46185166f2699b624cd2616c6fdd74ef4832 (diff) |
Adding client editor module to apex-pdp
The size of the review is big because of following:
1. edit_area & jquery are 3PP's used in the client editor
2. ui elements like svg, gifs, png
Change-Id: Ib62d8e6dda6e6dc1b6e604298e23505523f77cf2
Issue-ID: POLICY-864
Signed-off-by: ramverma <ram.krishna.verma@ericsson.com>
Diffstat (limited to 'client/client-editor/src/main/resources/webapp/js/edit_area/reg_syntax/perl.js')
-rw-r--r-- | client/client-editor/src/main/resources/webapp/js/edit_area/reg_syntax/perl.js | 88 |
1 files changed, 88 insertions, 0 deletions
diff --git a/client/client-editor/src/main/resources/webapp/js/edit_area/reg_syntax/perl.js b/client/client-editor/src/main/resources/webapp/js/edit_area/reg_syntax/perl.js new file mode 100644 index 000000000..0313c0c68 --- /dev/null +++ b/client/client-editor/src/main/resources/webapp/js/edit_area/reg_syntax/perl.js @@ -0,0 +1,88 @@ +/*************************************************************************** + * (c) 2008 - file created by Christoph Pinkel, MTC Infomedia OHG. + * + * You may choose any license of the current release or any future release + * of editarea to use, modify and/or redistribute this file. + * + * This language specification file supports for syntax checking on + * a large subset of Perl 5.x. + * The basic common syntax of Perl is fully supported, but as for + * the highlighting of built-in operations, it's mainly designed + * to support for hightlighting Perl code in a Safe environment (compartment) + * as used by CoMaNet for evaluation of administrative scripts. This Safe + * compartment basically allows for all of Opcode's :default operations, + * but little others. See http://perldoc.perl.org/Opcode.html to learn + * more. + ***************************************************************************/ + +editAreaLoader.load_syntax["perl"] = { + 'DISPLAY_NAME' : 'Perl', + 'COMMENT_SINGLE' : {1 : '#'}, + 'QUOTEMARKS' : {1: "'", 2: '"'}, + 'KEYWORD_CASE_SENSITIVE' : true, + 'KEYWORDS' : + { + 'core' : + [ "if", "else", "elsif", "while", "for", "each", "foreach", + "next", "last", "goto", "exists", "delete", "undef", + "my", "our", "local", "use", "require", "package", "keys", "values", + "sub", "bless", "ref", "return" ], + 'functions' : + [ + //from :base_core + "int", "hex", "oct", "abs", "substr", "vec", "study", "pos", + "length", "index", "rindex", "ord", "chr", "ucfirst", "lcfirst", + "uc", "lc", "quotemeta", "chop", "chomp", "split", "list", "splice", + "push", "pop", "shift", "unshift", "reverse", "and", "or", "dor", + "xor", "warn", "die", "prototype", + //from :base_mem + "concat", "repeat", "join", "range", + //none from :base_loop, as we'll see them as basic statements... + //from :base_orig + "sprintf", "crypt", "tie", "untie", "select", "localtime", "gmtime", + //others + "print", "open", "close" + ] + }, + 'OPERATORS' : + [ '+', '-', '/', '*', '=', '<', '>', '!', '||', '.', '&&', + ' eq ', ' ne ', '=~' ], + 'DELIMITERS' : + [ '(', ')', '[', ']', '{', '}' ], + 'REGEXPS' : + { + 'packagedecl' : { 'search': '(package )([^ \r\n\t#;]*)()', + 'class' : 'scopingnames', + 'modifiers' : 'g', 'execute' : 'before' }, + 'subdecl' : { 'search': '(sub )([^ \r\n\t#]*)()', + 'class' : 'scopingnames', + 'modifiers' : 'g', 'execute' : 'before' }, + 'scalars' : { 'search': '()(\\\$[a-zA-Z0-9_:]*)()', + 'class' : 'vars', + 'modifiers' : 'g', 'execute' : 'after' }, + 'arrays' : { 'search': '()(@[a-zA-Z0-9_:]*)()', + 'class' : 'vars', + 'modifiers' : 'g', 'execute' : 'after' }, + 'hashs' : { 'search': '()(%[a-zA-Z0-9_:]*)()', + 'class' : 'vars', + 'modifiers' : 'g', 'execute' : 'after' }, + }, + + 'STYLES' : + { + 'COMMENTS': 'color: #AAAAAA;', + 'QUOTESMARKS': 'color: #DC0000;', + 'KEYWORDS' : + { + 'core' : 'color: #8aca00;', + 'functions' : 'color: #2B60FF;' + }, + 'OPERATORS' : 'color: #8aca00;', + 'DELIMITERS' : 'color: #0038E1;', + 'REGEXPS': + { + 'scopingnames' : 'color: #ff0000;', + 'vars' : 'color: #00aaaa;', + } + } //'STYLES' +}; |