OLD | NEW |
1 Prism.languages.scheme = { | 1 Prism.languages.scheme = { |
2 'boolean' : /#(t|f){1}/, | 2 » 'comment' : /;.*/, |
3 'comment' : /;.*/, | 3 » 'string' : /"(?:[^"\\\r\n]|\\.)*?"|'[^('\s]*/, |
4 'keyword' : { | 4 » 'keyword' : { |
5 » » pattern : /([(])(define(-syntax|-library|-values)?|(case-)?lambd
a|let(-values|(rec)?(\*)?)?|else|if|cond|begin|delay|delay-force|parameterize|gu
ard|set!|(quasi-)?quote|syntax-rules)/, | 5 » » pattern : /(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?
lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameteri
ze|guard|set!|(?:quasi-)?quote|syntax-rules)/, |
6 lookbehind : true | 6 lookbehind : true |
7 }, | 7 » }, |
8 'builtin' : { | 8 » 'builtin' : { |
9 » » pattern : /([(])(cons|car|cdr|null\?|pair\?|boolean\?|eof-objec
t\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?|l
ist|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b/, | 9 » » pattern : /(\()(?:(?:cons|car|cdr|list|call-with-current-contin
uation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|ch
ar\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)/, |
10 lookbehind : true | 10 lookbehind : true |
11 }, | 11 » }, |
12 'string' : /(["])(?:(?=(\\?))\2.)*?\1|'[^('|\s)]+/, //thanks http://stackov
erflow.com/questions/171480/regex-grabbing-values-between-quotation-marks | 12 » 'number' : { |
13 'number' : /(\s|\))[-+]?[0-9]*\.?[0-9]+((\s*)[-+]{1}(\s*)[0-9]*\.?[0-9]+i)?/
, | 13 » » pattern: /(\s|\))[-+]?[0-9]*\.?[0-9]+(?:\s*[-+]\s*[0-9]*\.?[0-9]
+i)?\b/, |
14 'operator': /(\*|\+|\-|%|\/|<=|=>|>=|<|=|>)/, | 14 » » lookbehind: true |
15 'function' : { | 15 » }, |
16 » » pattern : /([(])[^(\s|\))]*\s/, | 16 » 'boolean' : /#[tf]/, |
| 17 » 'operator': { |
| 18 » » pattern: /(\()(?:[-+*%\/]|[<>]=?|=>?)/, |
| 19 » » lookbehind: true |
| 20 » }, |
| 21 » 'function' : { |
| 22 » » pattern : /(\()[^\s()]*(?=\s)/, |
17 lookbehind : true | 23 lookbehind : true |
18 }, | 24 » }, |
19 'punctuation' : /[()]/ | 25 » 'punctuation' : /[()]/ |
20 }; | 26 }; |
21 | |
22 | |
23 | |
24 | |
OLD | NEW |