1 | Prism.languages.scheme = {
|
2 | 'comment' : /;.*/,
|
3 | 'string' : {
|
4 | pattern: /"(?:[^"\\\r\n]|\\.)*"|'[^('\s]*/,
|
5 | greedy: true
|
6 | },
|
7 | 'keyword' : {
|
8 | pattern : /(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)/,
|
9 | lookbehind : true
|
10 | },
|
11 | 'builtin' : {
|
12 | pattern : /(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)/,
|
13 | lookbehind : true
|
14 | },
|
15 | 'number' : {
|
16 | pattern: /(\s|[()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/,
|
17 | lookbehind: true
|
18 | },
|
19 | 'boolean' : /#[tf]/,
|
20 | 'operator': {
|
21 | pattern: /(\()(?:[-+*%\/]|[<>]=?|=>?)/,
|
22 | lookbehind: true
|
23 | },
|
24 | 'function' : {
|
25 | pattern : /(\()[^\s()]*(?=\s)/,
|
26 | lookbehind : true
|
27 | },
|
28 | 'punctuation' : /[()]/
|
29 | }; |
\ | No newline at end of file |