Skip to content

Instantly share code, notes, and snippets.

@drhayes
Created October 22, 2012 06:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save drhayes/3929978 to your computer and use it in GitHub Desktop.
Save drhayes/3929978 to your computer and use it in GitHub Desktop.
ImpactJS syntax definition
{ "name": "ImpactJS", "scopeName": "source.js.impact",
"fileTypes": ["js"],
"patterns": [
{
"name": "meta.module.impact",
"begin": "\\b(ig)\\.(module)\\(",
"beginCaptures": {
"1": {
"name": "support.variable.impact.namespace"
},
"2": {
"name": "support.function.impact"
}
},
"end": "\\)\\b",
"patterns": [
{
"name": "entity.name.impact.module",
"match": "['\"]\\b(.+)\\b['\"]"
},
{
"name": "meta.module.impact.requirements",
"begin": "\\.\\s*(requires)\\s*\\((?=\\s*['\"a-zA-Z0-9\\.\\,\\s]*)",
"beginCaptures": {
"1": {
"name": "support.function.impact"
}
},
"end": "\\)(?=(\\.\\s*defines)?)",
"patterns": [
{
"name": "entity.name.requirement",
"match": "['\"][\\w\\.]+['\"]"
}
]
},
{
"name": "meta.module.impact.definition",
"begin": "(defines)\\s*\\(",
"beginCaptures": {
"1": {
"name": "support.function.impact"
}
},
"end": "\\);",
"patterns": [
{
"include": "source.js"
},
{
"include": "#ImpactEntity"
},
{
"include": "#ImpactExtend"
}
]
}
]
}
],
"uuid": "fadaa18d-154c-45fb-98e3-64c3f4e4cbeb",
"repository": {
"ImpactEntity": {
"name": "support.class.impact.entity",
"match": "\\big.Entity\\b"
},
"ImpactExtend": {
"name": "support.function.impact",
"match": "\\bextend\\b"
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment