7 lines
12 KiB
JavaScript
7 lines
12 KiB
JavaScript
|
const lang = Object.freeze({ "displayName": "Puppet", "fileTypes": ["pp"], "foldingStartMarker": "(^\\s*/\\*|(\\{|\\[|\\()\\s*$)", "foldingStopMarker": "(\\*/|^\\s*(\\}|\\]|\\)))", "name": "puppet", "patterns": [{ "include": "#line_comment" }, { "include": "#constants" }, { "begin": "^\\s*/\\*", "end": "\\*/", "name": "comment.block.puppet" }, { "begin": "\\b(node)\\b", "captures": { "1": { "name": "storage.type.puppet" }, "2": { "name": "entity.name.type.class.puppet" } }, "end": "(?={)", "name": "meta.definition.class.puppet", "patterns": [{ "match": "\\bdefault\\b", "name": "keyword.puppet" }, { "include": "#strings" }, { "include": "#regex-literal" }] }, { "begin": "\\b(class)\\s+((?#Qualified Resource Name)(?:[a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)+|(?#Bareword Resource Name)[a-z][a-z0-9_]*)\\s*", "captures": { "1": { "name": "storage.type.puppet" }, "2": { "name": "entity.name.type.class.puppet" } }, "end": "(?={)", "name": "meta.definition.class.puppet", "patterns": [{ "begin": "\\b(inherits)\\b\\s+", "captures": { "1": { "name": "storage.modifier.puppet" } }, "end": "(?=\\(|{)", "name": "meta.definition.class.inherits.puppet", "patterns": [{ "match": '\\b((?:[-_A-Za-z0-9".]+::)*[-_A-Za-z0-9".]+)\\b', "name": "support.type.puppet" }] }, { "include": "#line_comment" }, { "include": "#resource-parameters" }, { "include": "#parameter-default-types" }] }, { "begin": "^\\s*(plan)\\s+((?#Qualified Resource Name)(?:[a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)+|(?#Bareword Resource Name)[a-z][a-z0-9_]*)\\s*", "captures": { "1": { "name": "storage.type.puppet" }, "2": { "name": "entity.name.type.plan.puppet" } }, "end": "(?={)", "name": "meta.definition.plan.puppet", "patterns": [{ "include": "#line_comment" }, { "include": "#resource-parameters" }, { "include": "#parameter-default-types" }] }, { "begin": "^\\s*(define|function)\\s+((?#Bareword Resource Name)[a-z][a-z0-9_]*|(?#Qualified Resource Name)(?:[a-z][a-z0-9_]*)?(?:::[a-z][a-z0-9_]*)+)\\s*(\\()", "captures": { "1": { "name": "storage.type.function.puppet" }, "2": { "name": "entity.name.function.puppet" } }, "end": "(?={)", "name": "meta.function.puppet", "patterns": [{ "include": "#line_comment" }, { "include": "#resource-parameters" }, { "include": "#parameter-default-types" }] }, { "captures": { "1": { "name": "keyword.control.puppet" } }, "match": "\\b(case|else|elsif|if|unless)(?!::)\\b" }, { "include": "#keywords" }, { "include": "#resource-definition" }, { "include": "#heredoc" }, { "include": "#strings" }, { "include": "#puppet-datatypes" }, { "include": "#array" }, { "match": '((\\$?)"?[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*"?):(?=\\s+|$)', "name": "entity.name.section.puppet" }, { "include": "#numbers" }, { "include": "#variable" }, { "begin": "\\b(import|include|contain|require)\\s+(?!.*=>)", "beginCaptures": { "1": { "name": "keyword.control.import.include.puppet" } }, "contentName": "variable.parameter.include.puppet", "end": "(?=\\s|$)", "name": "meta.include.puppet" }, { "match": "\\b\\w+\\s*(?==>)\\s*", "name": "constant.other.key.puppet" }, { "match": "(?<={)\\s*\\w+\\s*(?=})", "name": "constant.other.bareword.puppet" }, { "match": "\\b(alert|crit|debug|defined|emerg|err|escape|fail|failed|file|generate|gsub|info|notice|package|realize|search|tag|tagged|template|warning)\\b(?!.*{)", "name": "support.function.puppet" }, { "match": "=>", "name": "punctuation.separator.key-value.puppet" }, { "match": "->", "name": "keyword.control.orderarrow.puppet" }, { "match": "~>", "name": "keyword.control.notifyarrow.puppet" }, { "include": "#regex-literal" }], "repository": { "array": { "begin": "(\\[)", "beginCaptures": { "1": { "name": "punctuation.definition.array.begin.puppet" } }, "end": "\\]", "endCaptures": { "0": { "name": "punctuation.definition.array.end.puppet" } }, "name": "meta.array.puppet", "patterns": [{ "match": "\\s*,\\s*" }, { "include": "#parameter-default-types" }, { "include": "#line_comment" }] }, "constants": { "patterns": [{ "match": "\\b(absent|directory|false|file|present|running|stopped|true)\\b(?!.*{)", "name": "constant.langua
|
||
|
var puppet = [
|
||
|
lang
|
||
|
];
|
||
|
|
||
|
export { puppet as default };
|