Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(332)

Unified Diff: lib/src/prism/components/prism-scheme.js

Issue 1418513006: update elements and fix some bugs (Closed) Base URL: git@github.com:dart-lang/polymer_elements.git@master
Patch Set: code review updates Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/src/prism/components/prism-scala.min.js ('k') | lib/src/prism/components/prism-scheme.min.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/prism/components/prism-scheme.js
diff --git a/lib/src/prism/components/prism-scheme.js b/lib/src/prism/components/prism-scheme.js
index c3b592fba2e1a4263ec0a96319c6ce7de0fd5263..4cdbd0b90a297080a1570bacf0bfddf5b1b74578 100644
--- a/lib/src/prism/components/prism-scheme.js
+++ b/lib/src/prism/components/prism-scheme.js
@@ -1,24 +1,26 @@
Prism.languages.scheme = {
- 'boolean' : /#(t|f){1}/,
- 'comment' : /;.*/,
- 'keyword' : {
- pattern : /([(])(define(-syntax|-library|-values)?|(case-)?lambda|let(-values|(rec)?(\*)?)?|else|if|cond|begin|delay|delay-force|parameterize|guard|set!|(quasi-)?quote|syntax-rules)/,
+ 'comment' : /;.*/,
+ 'string' : /"(?:[^"\\\r\n]|\\.)*?"|'[^('\s]*/,
+ 'keyword' : {
+ pattern : /(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)/,
lookbehind : true
- },
- 'builtin' : {
- pattern : /([(])(cons|car|cdr|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b/,
+ },
+ 'builtin' : {
+ 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\?)/,
lookbehind : true
- },
- 'string' : /(["])(?:(?=(\\?))\2.)*?\1|'[^('|\s)]+/, //thanks http://stackoverflow.com/questions/171480/regex-grabbing-values-between-quotation-marks
- 'number' : /(\s|\))[-+]?[0-9]*\.?[0-9]+((\s*)[-+]{1}(\s*)[0-9]*\.?[0-9]+i)?/,
- 'operator': /(\*|\+|\-|%|\/|<=|=>|>=|<|=|>)/,
- 'function' : {
- pattern : /([(])[^(\s|\))]*\s/,
+ },
+ 'number' : {
+ pattern: /(\s|\))[-+]?[0-9]*\.?[0-9]+(?:\s*[-+]\s*[0-9]*\.?[0-9]+i)?\b/,
+ lookbehind: true
+ },
+ 'boolean' : /#[tf]/,
+ 'operator': {
+ pattern: /(\()(?:[-+*%\/]|[<>]=?|=>?)/,
+ lookbehind: true
+ },
+ 'function' : {
+ pattern : /(\()[^\s()]*(?=\s)/,
lookbehind : true
- },
- 'punctuation' : /[()]/
-};
-
-
-
-
+ },
+ 'punctuation' : /[()]/
+};
« no previous file with comments | « lib/src/prism/components/prism-scala.min.js ('k') | lib/src/prism/components/prism-scheme.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698