grammars/source.puppet.json in github-linguist-7.11.1 vs grammars/source.puppet.json in github-linguist-7.12.0

- old
+ new

@@ -1,433 +2 @@ -{ - "name": "Puppet", - "scopeName": "source.puppet", - "patterns": [ - { - "include": "#line_comment" - }, - { - "name": "comment.block.puppet", - "begin": "^\\s*/\\*", - "end": "\\*/" - }, - { - "name": "meta.definition.class.puppet", - "begin": "(?x)^\\s*\n\t\t\t\t\t(node|class)\\s+\n\t\t\t\t\t((?:[-_A-Za-z0-9\".]+::)*[-_A-Za-z0-9\".]+)\\s* # identifier", - "end": "(?={)", - "patterns": [ - { - "include": "#variables" - }, - { - "include": "#constants" - }, - { - "include": "#strings" - }, - { - "include": "#numbers" - }, - { - "name": "meta.definition.class.inherits.puppet", - "begin": "\\b(inherits)\\b\\s+", - "end": "(?={)", - "patterns": [ - { - "name": "support.type.puppet", - "match": "\\b((?:[-_A-Za-z0-9\".]+::)*[-_A-Za-z0-9\".]+)\\b" - } - ], - "captures": { - "1": { - "name": "storage.modifier.puppet" - } - } - } - ], - "captures": { - "1": { - "name": "storage.type.puppet" - }, - "2": { - "name": "entity.name.type.class.puppet" - } - } - }, - { - "name": "meta.function.puppet", - "contentName": "meta.function.arguments.puppet", - "begin": "^\\s*(define)\\s+([a-zA-Z0-9_:]+)\\s*(\\()", - "end": "\\)", - "patterns": [ - { - "name": "meta.function.argument.no-default.puppet", - "match": "((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\\s*(?=,|\\))", - "captures": { - "1": { - "name": "variable.other.puppet" - }, - "2": { - "name": "punctuation.definition.variable.puppet" - } - } - }, - { - "name": "meta.function.argument.default.puppet", - "begin": "((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(?:\\s*(=)\\s*)\\s*", - "end": "(?=,|\\))", - "patterns": [ - { - "include": "#parameter-default-types" - } - ], - "captures": { - "1": { - "name": "variable.other.puppet" - }, - "2": { - "name": "punctuation.definition.variable.puppet" - }, - "3": { - "name": "keyword.operator.assignment.puppet" - } - } - } - ], - "beginCaptures": { - "1": { - "name": "storage.type.function.puppet" - }, - "2": { - "name": "entity.name.function.puppet" - }, - "3": { - "name": "punctuation.definition.parameters.begin.puppet" - } - }, - "endCaptures": { - "1": { - "name": "punctuation.definition.parameters.end.puppet" - } - } - }, - { - "name": "meta.definition.resource.puppet", - "match": "^\\s*(\\S+)\\s*{\\s*(['\"].+['\"]):", - "captures": { - "1": { - "name": "storage.type.puppet" - }, - "2": { - "name": "entity.name.section.puppet" - } - } - }, - { - "name": "keyword.control.puppet", - "match": "\\b(case|if|unless|else|elsif)(?!::)" - }, - { - "name": "entity.name.section.puppet", - "match": "((\\$?)\"?[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*\"?):(?=\\s+|$)" - }, - { - "include": "#strings" - }, - { - "include": "#variable" - }, - { - "include": "#constants" - }, - { - "name": "meta.include.puppet", - "begin": "(?i)\\b(import|include)\\b\\s*", - "end": "(?=\\s|$)", - "beginCaptures": { - "1": { - "name": "keyword.control.import.include.puppet" - } - } - }, - { - "name": "constant.other.key.puppet", - "match": "\\b\\w+\\s*(?==\u003e)\\s*" - }, - { - "name": "constant.other.bareword.puppet", - "match": "(?\u003c={)\\s*\\w+\\s*(?=})" - }, - { - "name": "support.function.puppet", - "match": "\\b(escape|gsub|alert|crit|debug|notice|defined|emerg|err|failed|file|generate|include|info|realize|search|tag|tagged|template|warning)\\b" - } - ], - "repository": { - "constants": { - "patterns": [ - { - "name": "constant.language.puppet", - "match": "(?i)\\b(false|true|running|undef|present|absent|file|directory)\\b" - } - ] - }, - "double-quoted-string": { - "name": "string.quoted.double.puppet", - "begin": "\"", - "end": "\"", - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#variable" - } - ], - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.puppet" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.puppet" - } - } - }, - "escaped_char": { - "name": "constant.character.escape.puppet", - "match": "\\\\." - }, - "line_comment": { - "patterns": [ - { - "name": "meta.comment.full-line.puppet", - "match": "^((#).*$\\n?)", - "captures": { - "1": { - "name": "comment.line.number-sign.puppet" - }, - "2": { - "name": "punctuation.definition.comment.puppet" - } - } - }, - { - "name": "comment.line.number-sign.puppet", - "match": "(#).*$\\n?", - "captures": { - "1": { - "name": "punctuation.definition.comment.puppet" - } - } - } - ] - }, - "nested_braces": { - "begin": "\\{", - "end": "\\}", - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#nested_braces" - } - ], - "captures": { - "1": { - "name": "punctuation.section.scope.puppet" - } - } - }, - "nested_braces_interpolated": { - "begin": "\\{", - "end": "\\}", - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#variable" - }, - { - "include": "#nested_braces_interpolated" - } - ], - "captures": { - "1": { - "name": "punctuation.section.scope.puppet" - } - } - }, - "nested_brackets": { - "begin": "\\[", - "end": "\\]", - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#nested_brackets" - } - ], - "captures": { - "1": { - "name": "punctuation.section.scope.puppet" - } - } - }, - "nested_brackets_interpolated": { - "begin": "\\[", - "end": "\\]", - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#variable" - }, - { - "include": "#nested_brackets_interpolated" - } - ], - "captures": { - "1": { - "name": "punctuation.section.scope.puppet" - } - } - }, - "nested_parens": { - "begin": "\\(", - "end": "\\)", - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#nested_parens" - } - ], - "captures": { - "1": { - "name": "punctuation.section.scope.puppet" - } - } - }, - "nested_parens_interpolated": { - "begin": "\\(", - "end": "\\)", - "patterns": [ - { - "include": "#escaped_char" - }, - { - "include": "#variable" - }, - { - "include": "#nested_parens_interpolated" - } - ], - "captures": { - "1": { - "name": "punctuation.section.scope.puppet" - } - } - }, - "parameter-default-types": { - "patterns": [ - { - "include": "#strings" - }, - { - "include": "#numbers" - }, - { - "include": "#variables" - }, - { - "name": "keyword.operator.assignment.php", - "match": "=" - }, - { - "name": "meta.array.php", - "begin": "(\\[)", - "end": "\\]", - "patterns": [ - { - "include": "#parameter-default-types" - } - ], - "beginCaptures": { - "1": { - "name": "punctuation.definition.array.begin.puppet" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.array.end.puppet" - } - } - }, - { - "include": "#constants" - } - ] - }, - "single-quoted-string": { - "name": "string.quoted.single.puppet", - "begin": "'", - "end": "'", - "patterns": [ - { - "include": "#escaped_char" - } - ], - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.puppet" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.puppet" - } - } - }, - "strings": { - "patterns": [ - { - "include": "#double-quoted-string" - }, - { - "include": "#single-quoted-string" - } - ] - }, - "variable": { - "patterns": [ - { - "name": "variable.other.readwrite.global.puppet", - "match": "(\\$)([a-zA-Zx7f-xff\\$]|::)([a-zA-Z0-9_x7f-xff\\$]|::)*\\b", - "captures": { - "1": { - "name": "punctuation.definition.variable.puppet" - } - } - }, - { - "name": "variable.other.readwrite.global.puppet", - "match": "(\\$\\{)(?:[a-zA-Zx7f-xff\\$]|::)(?:[a-zA-Z0-9_x7f-xff\\$]|::)*(\\})", - "captures": { - "1": { - "name": "punctuation.definition.variable.puppet" - }, - "2": { - "name": "punctuation.definition.variable.puppet" - } - } - } - ] - } - } -} +{"name":"Puppet","scopeName":"source.puppet","patterns":[{"include":"#line_comment"},{"name":"comment.block.puppet","begin":"^\\s*/\\*","end":"\\*/"},{"name":"meta.definition.class.puppet","begin":"(?x)^\\s*\n\t\t\t\t\t(node|class)\\s+\n\t\t\t\t\t((?:[-_A-Za-z0-9\".]+::)*[-_A-Za-z0-9\".]+)\\s* # identifier","end":"(?={)","patterns":[{"include":"#variables"},{"include":"#constants"},{"include":"#strings"},{"include":"#numbers"},{"name":"meta.definition.class.inherits.puppet","begin":"\\b(inherits)\\b\\s+","end":"(?={)","patterns":[{"name":"support.type.puppet","match":"\\b((?:[-_A-Za-z0-9\".]+::)*[-_A-Za-z0-9\".]+)\\b"}],"captures":{"1":{"name":"storage.modifier.puppet"}}}],"captures":{"1":{"name":"storage.type.puppet"},"2":{"name":"entity.name.type.class.puppet"}}},{"name":"meta.function.puppet","contentName":"meta.function.arguments.puppet","begin":"^\\s*(define)\\s+([a-zA-Z0-9_:]+)\\s*(\\()","end":"\\)","patterns":[{"name":"meta.function.argument.no-default.puppet","match":"((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)\\s*(?=,|\\))","captures":{"1":{"name":"variable.other.puppet"},"2":{"name":"punctuation.definition.variable.puppet"}}},{"name":"meta.function.argument.default.puppet","begin":"((\\$+)[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*)(?:\\s*(=)\\s*)\\s*","end":"(?=,|\\))","patterns":[{"include":"#parameter-default-types"}],"captures":{"1":{"name":"variable.other.puppet"},"2":{"name":"punctuation.definition.variable.puppet"},"3":{"name":"keyword.operator.assignment.puppet"}}}],"beginCaptures":{"1":{"name":"storage.type.function.puppet"},"2":{"name":"entity.name.function.puppet"},"3":{"name":"punctuation.definition.parameters.begin.puppet"}},"endCaptures":{"1":{"name":"punctuation.definition.parameters.end.puppet"}}},{"name":"meta.definition.resource.puppet","match":"^\\s*(\\S+)\\s*{\\s*(['\"].+['\"]):","captures":{"1":{"name":"storage.type.puppet"},"2":{"name":"entity.name.section.puppet"}}},{"name":"keyword.control.puppet","match":"\\b(case|if|unless|else|elsif)(?!::)"},{"name":"entity.name.section.puppet","match":"((\\$?)\"?[a-zA-Z_\\x{7f}-\\x{ff}][a-zA-Z0-9_\\x{7f}-\\x{ff}]*\"?):(?=\\s+|$)"},{"include":"#strings"},{"include":"#variable"},{"include":"#constants"},{"name":"meta.include.puppet","begin":"(?i)\\b(import|include)\\b\\s*","end":"(?=\\s|$)","beginCaptures":{"1":{"name":"keyword.control.import.include.puppet"}}},{"name":"constant.other.key.puppet","match":"\\b\\w+\\s*(?==\u003e)\\s*"},{"name":"constant.other.bareword.puppet","match":"(?\u003c={)\\s*\\w+\\s*(?=})"},{"name":"support.function.puppet","match":"\\b(escape|gsub|alert|crit|debug|notice|defined|emerg|err|failed|file|generate|include|info|realize|search|tag|tagged|template|warning)\\b"}],"repository":{"constants":{"patterns":[{"name":"constant.language.puppet","match":"(?i)\\b(false|true|running|undef|present|absent|file|directory)\\b"}]},"double-quoted-string":{"name":"string.quoted.double.puppet","begin":"\"","end":"\"","patterns":[{"include":"#escaped_char"},{"include":"#variable"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.puppet"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.puppet"}}},"escaped_char":{"name":"constant.character.escape.puppet","match":"\\\\."},"line_comment":{"patterns":[{"name":"meta.comment.full-line.puppet","match":"^((#).*$\\n?)","captures":{"1":{"name":"comment.line.number-sign.puppet"},"2":{"name":"punctuation.definition.comment.puppet"}}},{"name":"comment.line.number-sign.puppet","match":"(#).*$\\n?","captures":{"1":{"name":"punctuation.definition.comment.puppet"}}}]},"nested_braces":{"begin":"\\{","end":"\\}","patterns":[{"include":"#escaped_char"},{"include":"#nested_braces"}],"captures":{"1":{"name":"punctuation.section.scope.puppet"}}},"nested_braces_interpolated":{"begin":"\\{","end":"\\}","patterns":[{"include":"#escaped_char"},{"include":"#variable"},{"include":"#nested_braces_interpolated"}],"captures":{"1":{"name":"punctuation.section.scope.puppet"}}},"nested_brackets":{"begin":"\\[","end":"\\]","patterns":[{"include":"#escaped_char"},{"include":"#nested_brackets"}],"captures":{"1":{"name":"punctuation.section.scope.puppet"}}},"nested_brackets_interpolated":{"begin":"\\[","end":"\\]","patterns":[{"include":"#escaped_char"},{"include":"#variable"},{"include":"#nested_brackets_interpolated"}],"captures":{"1":{"name":"punctuation.section.scope.puppet"}}},"nested_parens":{"begin":"\\(","end":"\\)","patterns":[{"include":"#escaped_char"},{"include":"#nested_parens"}],"captures":{"1":{"name":"punctuation.section.scope.puppet"}}},"nested_parens_interpolated":{"begin":"\\(","end":"\\)","patterns":[{"include":"#escaped_char"},{"include":"#variable"},{"include":"#nested_parens_interpolated"}],"captures":{"1":{"name":"punctuation.section.scope.puppet"}}},"parameter-default-types":{"patterns":[{"include":"#strings"},{"include":"#numbers"},{"include":"#variables"},{"name":"keyword.operator.assignment.php","match":"="},{"name":"meta.array.php","begin":"(\\[)","end":"\\]","patterns":[{"include":"#parameter-default-types"}],"beginCaptures":{"1":{"name":"punctuation.definition.array.begin.puppet"}},"endCaptures":{"0":{"name":"punctuation.definition.array.end.puppet"}}},{"include":"#constants"}]},"single-quoted-string":{"name":"string.quoted.single.puppet","begin":"'","end":"'","patterns":[{"include":"#escaped_char"}],"beginCaptures":{"0":{"name":"punctuation.definition.string.begin.puppet"}},"endCaptures":{"0":{"name":"punctuation.definition.string.end.puppet"}}},"strings":{"patterns":[{"include":"#double-quoted-string"},{"include":"#single-quoted-string"}]},"variable":{"patterns":[{"name":"variable.other.readwrite.global.puppet","match":"(\\$)([a-zA-Zx7f-xff\\$]|::)([a-zA-Z0-9_x7f-xff\\$]|::)*\\b","captures":{"1":{"name":"punctuation.definition.variable.puppet"}}},{"name":"variable.other.readwrite.global.puppet","match":"(\\$\\{)(?:[a-zA-Zx7f-xff\\$]|::)(?:[a-zA-Z0-9_x7f-xff\\$]|::)*(\\})","captures":{"1":{"name":"punctuation.definition.variable.puppet"},"2":{"name":"punctuation.definition.variable.puppet"}}}]}}}