~azzar1/unity/add-show-desktop-key

233 by mattgiuca
Added a shaky implementation of EditArea as the text editor.
1
editAreaLoader.load_syntax["c"] = {
2
	'COMMENT_SINGLE' : {1 : '//'}
3
	,'COMMENT_MULTI' : {'/*' : '*/'}
4
	,'QUOTEMARKS' : {1: "'", 2: '"'}
5
	,'KEYWORD_CASE_SENSITIVE' : true
6
	,'KEYWORDS' : {
7
		'constants' : [
8
			'NULL', 'false', 'stdin', 'stdout', 'stderr', 'true'
9
		]
10
		,'types' : [
11
			'FILE', 'auto', 'char', 'const', 'double',
12
			'extern', 'float', 'inline', 'int', 'long', 'register',
13
			'short', 'signed', 'size_t', 'static', 'struct',
14
			'time_t', 'typedef', 'union', 'unsigned', 'void',
15
			'volatile'
16
		]
17
		,'statements' : [
18
			'do', 'else', 'enum', 'for', 'goto', 'if', 'sizeof',
19
			'switch', 'while'
20
		]
21
 		,'keywords' : [
22
			'break', 'case', 'continue', 'default', 'delete',
23
			'return'
24
		]
25
	}
26
	,'OPERATORS' :[
27
		'+', '-', '/', '*', '=', '<', '>', '%', '!', '?', ':', '&'
28
	]
29
	,'DELIMITERS' :[
30
		'(', ')', '[', ']', '{', '}'
31
	]
32
	,'REGEXPS' : {
33
		'precompiler' : {
34
			'search' : '()(#[^\r\n]*)()'
35
			,'class' : 'precompiler'
36
			,'modifiers' : 'g'
37
			,'execute' : 'before'
38
		}
39
/*		,'precompilerstring' : {
40
			'search' : '(#[\t ]*include[\t ]*)([^\r\n]*)([^\r\n]*[\r\n])'
41
			,'class' : 'precompilerstring'
42
			,'modifiers' : 'g'
43
			,'execute' : 'before'
44
		}*/
45
	}
46
	,'STYLES' : {
47
		'COMMENTS': 'color: #AAAAAA;'
48
		,'QUOTESMARKS': 'color: #6381F8;'
49
		,'KEYWORDS' : {
50
			'constants' : 'color: #EE0000;'
51
			,'types' : 'color: #0000EE;'
52
			,'statements' : 'color: #60CA00;'
53
			,'keywords' : 'color: #48BDDF;'
54
		}
55
		,'OPERATORS' : 'color: #FF00FF;'
56
		,'DELIMITERS' : 'color: #0038E1;'
57
		,'REGEXPS' : {
58
			'precompiler' : 'color: #009900;'
59
			,'precompilerstring' : 'color: #994400;'
60
		}
61
	}
62
};