forked from highlightjs/highlight.js
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:vincent-zurczak/highlight.js into…
… vincent-zurczak-master Conflicts: AUTHORS.en.txt
- Loading branch information
Showing
8 changed files
with
199 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,3 +5,4 @@ docs/_build | |
__pycache__ | ||
*.swp | ||
node_modules | ||
.project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,3 +144,4 @@ Contributors: | |
- Mickael Delahaye <[email protected]> | ||
- Hakan Özler <[email protected]> | ||
- Trey Shugart <[email protected]> | ||
- Vincent Zurczak <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,3 +144,4 @@ URL: https://highlightjs.org/ | |
- Микаэль Делахэй <[email protected]> | ||
- Хакан Озлер <[email protected]> | ||
- Трей Шугарт <[email protected]> | ||
- Винсен Зуржак <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
/* | ||
Language: Roboconf | ||
Author: Vincent Zurczak <[email protected]> | ||
Website: http://roboconf.net | ||
Description: Syntax highlighting for Roboconf's DSL | ||
*/ | ||
|
||
function(hljs) { | ||
var IDENTIFIER = '[a-zA-Z-_][^\n{\r\n]+\\{'; | ||
|
||
return { | ||
aliases: ['graph', 'instances'], | ||
case_insensitive: true, | ||
keywords: 'import', | ||
contains: [ | ||
// Facet sections | ||
{ | ||
className: 'facet', | ||
begin: '^facet ' + IDENTIFIER, | ||
end: '}', | ||
keywords: 'facet installer exports children extends', | ||
contains: [ | ||
hljs.HASH_COMMENT_MODE | ||
] | ||
}, | ||
|
||
// Instance sections | ||
{ | ||
className: 'instance-of', | ||
begin: '^instance of ' + IDENTIFIER, | ||
end: '}', | ||
keywords: 'name count channels instance-data instance-state instance of', | ||
contains: [ | ||
// Instance overridden properties | ||
{ | ||
className: 'keyword', | ||
begin: '[a-zA-Z-_]+( |\t)*:' | ||
}, | ||
hljs.HASH_COMMENT_MODE | ||
] | ||
}, | ||
|
||
// Component sections | ||
{ | ||
className: 'component', | ||
begin: '^' + IDENTIFIER, | ||
end: '}', | ||
lexemes: '\\(?[a-zA-Z]+\\)?', | ||
keywords: 'installer exports children extends imports facets alias (optional)', | ||
contains: [ | ||
// Imported component variables | ||
{ | ||
className: 'string', | ||
begin: '\\.[a-zA-Z-_]+', | ||
end: '\\s|,|;', | ||
excludeEnd: true | ||
}, | ||
hljs.HASH_COMMENT_MODE | ||
] | ||
}, | ||
|
||
// Comments | ||
hljs.HASH_COMMENT_MODE | ||
] | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# This is a comment | ||
import toto.graph; | ||
|
||
## | ||
# Facet | ||
## | ||
facet VM { | ||
installer: iaas; | ||
} | ||
|
||
# Components | ||
VM_ec2 { | ||
facets: VM; | ||
children: cluster-node, mysql; | ||
} | ||
|
||
VM_openstack { | ||
facets: VM; | ||
children: cluster-node, mysql; | ||
} | ||
|
||
cluster-node { | ||
alias: a cluster node; | ||
installer: puppet; | ||
exports: ip, port, optional-property1, optional_property2; | ||
imports: cluster-node.ip (optional), cluster-node.port (optional), mysql.ip, mysql.port; | ||
} | ||
|
||
mysql { | ||
alias: a MySQL database; | ||
installer: puppet; | ||
exports: ip, port; | ||
} | ||
|
||
## | ||
# Normally, instances are defined in another file... | ||
## | ||
instance of VM_ec2 { | ||
name: VM_; | ||
count: 3; | ||
my-instance-property: whatever; | ||
|
||
instance of cluster-node { | ||
name: cluster node; # An in-line comment | ||
} | ||
} | ||
|
||
instance of VM_openstack { | ||
name: VM_database; | ||
|
||
instance of mysql { | ||
name: mysql; | ||
} | ||
} |