added site files
This commit is contained in:
parent
a6f70a6c78
commit
329148c253
253 changed files with 30486 additions and 0 deletions
59
EnlighterJS/Source/Language/Shell.js
Normal file
59
EnlighterJS/Source/Language/Shell.js
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
---
|
||||
description: Shell/Bash Scripting
|
||||
|
||||
license: MIT-style
|
||||
|
||||
authors:
|
||||
- Andi Dittrich
|
||||
|
||||
requires:
|
||||
- Core/1.4.5
|
||||
|
||||
provides: [EnlighterJS.Language.shell]
|
||||
...
|
||||
*/
|
||||
EJS.Language.shell = new Class ({
|
||||
|
||||
Extends: EJS.Language.generic,
|
||||
|
||||
setupLanguage: function(){
|
||||
this.keywords = {
|
||||
keywords: {
|
||||
csv: 'if, fi, then, elif, else, for, do, done, until, while, break, continue, case, esac, return, function, in, eq, ne, gt, lt, ge, le',
|
||||
alias: 'kw1'
|
||||
}
|
||||
};
|
||||
|
||||
this.patterns = {
|
||||
'comments': {
|
||||
pattern: /((?:^\s*|\s+)#.*$)/gm,
|
||||
alias: 'co1'
|
||||
},
|
||||
'strings': {
|
||||
pattern: this.common.strings,
|
||||
alias: 'st0'
|
||||
},
|
||||
'backticks': {
|
||||
pattern: /`.*?`/gm,
|
||||
alias: 'st1'
|
||||
},
|
||||
'cases': {
|
||||
pattern: /^\s*\w+\)\s*$/gm,
|
||||
alias: 'kw2'
|
||||
},
|
||||
'def': {
|
||||
pattern: /^(\s*\w+)=/gm,
|
||||
alias: 'kw4'
|
||||
},
|
||||
'vars': {
|
||||
pattern: /(\$\w+)\b/gim,
|
||||
alias: 'kw4'
|
||||
},
|
||||
'functions': {
|
||||
pattern: /^\s*\w+\(\)\s*\{/gm,
|
||||
alias: 'kw3'
|
||||
}
|
||||
};
|
||||
}
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue