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

Unified Diff: lib/src/prism/components/prism-tcl.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-swift.min.js ('k') | lib/src/prism/components/prism-tcl.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-tcl.js
diff --git a/lib/src/prism/components/prism-tcl.js b/lib/src/prism/components/prism-tcl.js
new file mode 100644
index 0000000000000000000000000000000000000000..b9e2206d6c64e4c8f933de11f551dff802309583
--- /dev/null
+++ b/lib/src/prism/components/prism-tcl.js
@@ -0,0 +1,43 @@
+Prism.languages.tcl = {
+ 'comment': {
+ pattern: /(^|[^\\])#.*/,
+ lookbehind: true
+ },
+ 'string': /"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,
+ 'variable': [
+ {
+ pattern: /(\$)(?:::)?(?:[a-zA-Z0-9]+::)*[a-zA-Z0-9_]+/,
+ lookbehind: true
+ },
+ {
+ pattern: /(\$){[^}]+}/,
+ lookbehind: true
+ },
+ {
+ pattern: /(^\s*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*[a-zA-Z0-9_]+/m,
+ lookbehind: true
+ }
+ ],
+ 'function': {
+ pattern: /(^\s*proc[ \t]+)[^\s]+/m,
+ lookbehind: true
+ },
+ 'builtin': [
+ {
+ pattern: /(^\s*)(?:proc|return|class|error|eval|exit|for|foreach|if|switch|while|break|continue)\b/m,
+ lookbehind: true
+ },
+ /\b(elseif|else)\b/
+ ],
+ 'scope': {
+ pattern: /(^\s*)(global|upvar|variable)\b/m,
+ lookbehind: true,
+ alias: 'constant'
+ },
+ 'keyword': {
+ pattern: /(^\s*|\[)(after|append|apply|array|auto_(?:execok|import|load|mkindex|qualify|reset)|automkindex_old|bgerror|binary|catch|cd|chan|clock|close|concat|dde|dict|encoding|eof|exec|expr|fblocked|fconfigure|fcopy|file(?:event|name)?|flush|gets|glob|history|http|incr|info|interp|join|lappend|lassign|lindex|linsert|list|llength|load|lrange|lrepeat|lreplace|lreverse|lsearch|lset|lsort|math(?:func|op)|memory|msgcat|namespace|open|package|parray|pid|pkg_mkIndex|platform|puts|pwd|re_syntax|read|refchan|regexp|registry|regsub|rename|Safe_Base|scan|seek|set|socket|source|split|string|subst|Tcl|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|wordBreak(?:After|Before)|test|vars)|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,
+ lookbehind: true
+ },
+ 'operator': /!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|ne|in|ni)\b/,
+ 'punctuation': /[{}()\[\]]/
+};
« no previous file with comments | « lib/src/prism/components/prism-swift.min.js ('k') | lib/src/prism/components/prism-tcl.min.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698