summaryrefslogtreecommitdiffstats
path: root/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/cpp.js
diff options
context:
space:
mode:
authorliamfallon <liam.fallon@est.tech>2020-07-16 10:24:08 +0100
committerliamfallon <liam.fallon@est.tech>2020-07-17 14:46:26 +0100
commit2de08a64e959788f288d82cd4410fee9424a11bc (patch)
tree93d90b4de43e6e52c7059e842cf8c5ba4d10ecca /gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/cpp.js
parentee41415476b6ea1775a2f689eecb8713abf81f0c (diff)
Move apex policy editor to policy-gui
This review moves the code for the apex policy editor from the apex repo to the GUI repo. The docker part of the build will be moved in the next review because it is intertwined with the other two legacy apex GUIs and needs to be disentangled. Subsequent reviews on the apex repo will remove this code from there. Issue-ID: POLICY-2621 Change-Id: Ib9a43f463b839201656208a48ab48869a19f963a Signed-off-by: liamfallon <liam.fallon@est.tech>
Diffstat (limited to 'gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/cpp.js')
-rw-r--r--gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/cpp.js66
1 files changed, 66 insertions, 0 deletions
diff --git a/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/cpp.js b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/cpp.js
new file mode 100644
index 0000000..98e6493
--- /dev/null
+++ b/gui-editors/gui-editor-apex/src/main/resources/webapp/js/edit_area/reg_syntax/cpp.js
@@ -0,0 +1,66 @@
+editAreaLoader.load_syntax["cpp"] = {
+ 'DISPLAY_NAME' : 'CPP'
+ ,'COMMENT_SINGLE' : {1 : '//'}
+ ,'COMMENT_MULTI' : {'/*' : '*/'}
+ ,'QUOTEMARKS' : {1: "'", 2: '"'}
+ ,'KEYWORD_CASE_SENSITIVE' : true
+ ,'KEYWORDS' : {
+ 'constants' : [
+ 'NULL', 'false', 'std', 'stdin', 'stdout', 'stderr',
+ 'true'
+ ]
+ ,'types' : [
+ 'FILE', 'auto', 'char', 'class', 'const', 'double',
+ 'extern', 'float', 'friend', 'inline', 'int',
+ 'iterator', 'long', 'map', 'operator', 'queue',
+ 'register', 'short', 'signed', 'size_t', 'stack',
+ 'static', 'string', 'struct', 'time_t', 'typedef',
+ 'union', 'unsigned', 'vector', 'void', 'volatile'
+ ]
+ ,'statements' : [
+ 'catch', 'do', 'else', 'enum', 'for', 'goto', 'if',
+ 'sizeof', 'switch', 'this', 'throw', 'try', 'while'
+ ]
+ ,'keywords' : [
+ 'break', 'case', 'continue', 'default', 'delete',
+ 'namespace', 'new', 'private', 'protected', 'public',
+ 'return', 'using'
+ ]
+ }
+ ,'OPERATORS' :[
+ '+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
+ ]
+ ,'DELIMITERS' :[
+ '(', ')', '[', ']', '{', '}'
+ ]
+ ,'REGEXPS' : {
+ 'precompiler' : {
+ 'search' : '()(#[^\r\n]*)()'
+ ,'class' : 'precompiler'
+ ,'modifiers' : 'g'
+ ,'execute' : 'before'
+ }
+/* ,'precompilerstring' : {
+ 'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])'
+ ,'class' : 'precompilerstring'
+ ,'modifiers' : 'g'
+ ,'execute' : 'before'
+ }*/
+ }
+ ,'STYLES' : {
+ 'COMMENTS': 'color: #AAAAAA;'
+ ,'QUOTESMARKS': 'color: #6381F8;'
+ ,'KEYWORDS' : {
+ 'constants' : 'color: #EE0000;'
+ ,'types' : 'color: #0000EE;'
+ ,'statements' : 'color: #60CA00;'
+ ,'keywords' : 'color: #48BDDF;'
+ }
+ ,'OPERATORS' : 'color: #FF00FF;'
+ ,'DELIMITERS' : 'color: #0038E1;'
+ ,'REGEXPS' : {
+ 'precompiler' : 'color: #009900;'
+ ,'precompilerstring' : 'color: #994400;'
+ }
+ }
+};