main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.9 KB
|
Rev | Line | |
---|
[d24f17c] | 1 | 'use strict'
|
---|
| 2 |
|
---|
| 3 | module.exports = tcl
|
---|
| 4 | tcl.displayName = 'tcl'
|
---|
| 5 | tcl.aliases = []
|
---|
| 6 | function tcl(Prism) {
|
---|
| 7 | Prism.languages.tcl = {
|
---|
| 8 | comment: {
|
---|
| 9 | pattern: /(^|[^\\])#.*/,
|
---|
| 10 | lookbehind: true
|
---|
| 11 | },
|
---|
| 12 | string: {
|
---|
| 13 | pattern: /"(?:[^"\\\r\n]|\\(?:\r\n|[\s\S]))*"/,
|
---|
| 14 | greedy: true
|
---|
| 15 | },
|
---|
| 16 | variable: [
|
---|
| 17 | {
|
---|
| 18 | pattern: /(\$)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/,
|
---|
| 19 | lookbehind: true
|
---|
| 20 | },
|
---|
| 21 | {
|
---|
| 22 | pattern: /(\$)\{[^}]+\}/,
|
---|
| 23 | lookbehind: true
|
---|
| 24 | },
|
---|
| 25 | {
|
---|
| 26 | pattern: /(^[\t ]*set[ \t]+)(?:::)?(?:[a-zA-Z0-9]+::)*\w+/m,
|
---|
| 27 | lookbehind: true
|
---|
| 28 | }
|
---|
| 29 | ],
|
---|
| 30 | function: {
|
---|
| 31 | pattern: /(^[\t ]*proc[ \t]+)\S+/m,
|
---|
| 32 | lookbehind: true
|
---|
| 33 | },
|
---|
| 34 | builtin: [
|
---|
| 35 | {
|
---|
| 36 | pattern:
|
---|
| 37 | /(^[\t ]*)(?:break|class|continue|error|eval|exit|for|foreach|if|proc|return|switch|while)\b/m,
|
---|
| 38 | lookbehind: true
|
---|
| 39 | },
|
---|
| 40 | /\b(?:else|elseif)\b/
|
---|
| 41 | ],
|
---|
| 42 | scope: {
|
---|
| 43 | pattern: /(^[\t ]*)(?:global|upvar|variable)\b/m,
|
---|
| 44 | lookbehind: true,
|
---|
| 45 | alias: 'constant'
|
---|
| 46 | },
|
---|
| 47 | keyword: {
|
---|
| 48 | pattern:
|
---|
| 49 | /(^[\t ]*|\[)(?:Safe_Base|Tcl|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|scan|seek|set|socket|source|split|string|subst|tcl(?:_endOfWord|_findLibrary|startOf(?:Next|Previous)Word|test|vars|wordBreak(?:After|Before))|tell|time|tm|trace|unknown|unload|unset|update|uplevel|vwait)\b/m,
|
---|
| 50 | lookbehind: true
|
---|
| 51 | },
|
---|
| 52 | operator:
|
---|
| 53 | /!=?|\*\*?|==|&&?|\|\|?|<[=<]?|>[=>]?|[-+~\/%?^]|\b(?:eq|in|ne|ni)\b/,
|
---|
| 54 | punctuation: /[{}()\[\]]/
|
---|
| 55 | }
|
---|
| 56 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.