bmc-tpl-code-all-around/syntaxes/tpl.tmLanguage.json

2166 lines
58 KiB
JSON
Raw Permalink Normal View History

{
"name": "TPL",
"comment": "Based on https://github.com/trianglesis/language-tplpre",
"scopeName": "source.tpl",
"fileTypes": [
"tpl"
],
"foldingStartMarker": "^(//|tpl).*$",
"foldingStopMarker": "(^$)",
"patterns": [
{
"include": "#doc_strings"
},
{
"include": "#comment_TODO_line"
},
{
"include": "#comment_line"
},
{
"include": "#metadata_2"
},
{
"include": "#overwiev"
},
{
"include": "#simple_identifiers"
},
{
"include": "#if_addm"
},
{
"match": "tpl\\s+(\\$\\$TPLVERSION\\$\\$|\\d+\\.\\d+)\\s+module\\s(.*);",
"captures": {
"1": {
"name": "constant.character.tpl"
},
"2": {
"name": "constant.character.tpl"
}
}
},
{
"match": "from\\s(\\w+)(?:.(\\w+))?(?:.(\\w+))?\\simport\\s(\\S+)\\s(\\d+(?:.\\d+)+);",
"captures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "storage.type.tpl"
},
"3": {
"name": "variable.parameter.tpl"
},
"4": {
"name": "entity.name.function.tpl"
},
"5": {
"name": "constant.numeric.tpl"
}
}
},
{
"begin": "^(configuration)\\s(\\S+)\\s(\\d+\\.\\d+)",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "entity.name.function.tpl"
},
"3": {
"name": "constant.numeric.tpl"
}
},
"end": "^(end\\sconfiguration;)",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#comment_line"
},
{
"include": "#doc_strings"
},
{
"include": "#lines"
},
{
"include": "#if_addm"
}
]
},
{
"begin": "^(table)\\s(\\S+)\\s(\\d+(?:\\.\\d+)+)",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "entity.name.function"
},
"3": {
"name": "constant.numeric.tpl"
},
"4": {
"name": "comment.block.documentation.tpl"
}
},
"end": "^(end\\stable;)",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#comment_line"
},
{
"include": "#main"
}
]
},
{
"comment": "Adding SQL support via #lines",
"begin": "^(definitions)\\s(\\S+)\\s(\\d+(?:\\.\\d+)+)",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "entity.name.function"
},
"3": {
"name": "constant.numeric.tpl"
}
},
"end": "^(end\\sdefinitions;)",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#define"
},
{
"include": "#alt_define"
},
{
"include": "#comment_line"
},
{
"include": "#doc_strings"
},
{
"include": "#lines"
},
{
"include": "#if_addm"
}
]
},
{
"begin": "^\\b(pattern|syncmapping)\\s+(\\w+)\\s(\\d+(?:\\.\\d+)+)\\s+$",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "constant.numeric.tpl"
},
"3": {
"name": "constant.numeric.tpl"
}
},
"end": "\\b(end\\spattern|syncmapping;)",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#comment_TODO_line"
},
{
"include": "#comment_line"
},
{
"include": "#doc_strings"
},
{
"include": "#metadata"
},
{
"include": "#overwiev"
},
{
"include": "#constants"
},
{
"include": "#mapping"
},
{
"include": "#triggers"
},
{
"include": "#removal"
},
{
"include": "#body"
},
{
"include": "#if_addm"
},
{
"include": "#docstrings"
},
{
"include": "#doc_strings_block_doulbe_q"
}
]
}
],
"repository": {
"tags": {
"comment": "Tags",
"match": "(tags)",
"name": "keyword.control.import.tpl"
},
"tags_TKU": {
"comment": "Tags TKU",
"match": "(TKU_\\d+_\\d+_\\d+)",
"name": "constant.other.tpl"
},
"metadata": {
"begin": "^\\s*(metadata)\\s+?$",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"end": "^\\s*(end\\smetadata;)\\s+?$",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#comment_line"
},
{
"include": "#lines"
},
{
"include": "#if_addm"
}
]
},
"metadata_2": {
"begin": "^\\s*(metadata)\\s+?$",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"end": "^(end\\smetadata;)\\s+?$",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#comment_line"
},
{
"include": "#if_addm"
}
]
},
"overwiev": {
"begin": "^\\s*(overview)\\s+?$",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"end": "^\\s*(end\\soverview;)\\s+?$",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#comment_line"
},
{
"include": "#tags_TKU"
},
{
"include": "#keywords_all"
},
{
"include": "#if_addm"
}
]
},
"constants": {
"begin": "\\b(constants)\\s+?$",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"end": "\\b(end\\sconstants;)\\s+?$",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#all_functions"
},
{
"include": "#if_addm"
}
]
},
"mapping": {
"begin": "\\b(mapping)\\s+?$",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"end": "\\b(end\\mapping;)\\s+?$",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#all_functions"
},
{
"include": "#if_addm"
}
]
},
"triggers": {
"begin": "^\\s*(triggers)\\s+?$",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"end": "^\\s*(end\\striggers;)\\s+?$",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#all_functions"
},
{
"include": "#all_controls"
},
{
"include": "#keywords_cmd_indentify_trigger"
},
{
"include": "#if_addm"
}
]
},
"body": {
"begin": "^\\s*(body)$",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"end": "^\\s*(end\\sbody;)$",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#dev_keys"
},
{
"include": "#doc_strings"
},
{
"include": "#lines"
},
{
"include": "#all_functions"
},
{
"include": "#all_controls"
},
{
"include": "#if_addm"
}
]
},
"removal": {
"begin": "^\\s*(removal)",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"end": "^\\s*(end\\sremoval;)",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#all_functions"
},
{
"include": "#all_controls"
},
{
"include": "#if_addm"
}
]
},
"comment_line": {
"name": "comment.line.tpl",
"match": "(?<!\\'|\"|\\(|\\w)(//).*\\n"
},
"comment_TODO_line": {
"comment": "variable.parameter.tpl",
"begin": "(//)\\s?(TO(\\s+|)DO\\:)",
"beginCaptures": {
"1": {
"name": "comment.line.tpl"
},
"2": {
"name": "keyword.control.tpl"
}
},
"end": "(.*)",
"endCaptures": {
"1": {
"name": "variable.parameter.function.tpl"
}
}
},
"percent_line": {
"comment": "TODO: I got a problem here. two %% in one string - break coloring. This should use some more logic.",
"match": "(\\%((?:[^\\%]|\\\\\\\\|\\\\%)*)\\%)",
"name": "keyword.control.tpl",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "string.quoted.single.tpl"
}
}
},
"qouted_line": {
"match": "(?<!')(')([^']*)(('))(?!')",
"comment": "TODO: Still cannot match string like with empty or double quotes",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "string.quoted.single.tpl"
},
"4": {
"name": "keyword.control.tpl"
}
}
},
"qouted_line_empty": {
"match": "(?<!')(')(('))(?!')",
"comment": "TODO: Still cannot match string like with empty or double quotes",
"captures": {
"1": {
"name": "punctuation.definition.string.begin.tpl"
},
"2": {
"name": "punctuation.definition.string.end.tpl"
},
"3": {
"name": "meta.empty-string.single.tpl"
}
}
},
"double_qouted_line": {
"match": "(\\\"((?:[^\\\"]|\\\\\\\\|\\\\\")*)\\\")",
"comment": "TODO: Still cannot match string like with empty or single quotes",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "string.quoted.single.tpl"
}
}
},
"square_brackets_line_empty": {
"match": "(?<!\\[)(\\[)((\\]))(?!\\])",
"comment": "TODO: Still cannot match string like with empty or double quotes",
"captures": {
"1": {
"name": "punctuation.definition.string.begin.tpl"
},
"2": {
"name": "punctuation.definition.string.end.tpl"
},
"3": {
"name": "meta.empty-string.single.tpl"
}
}
},
"square_brackets_line_word": {
"match": "\\[(\\w*?[^\\d+?])\\]",
"captures": {
"1": {
"name": "variable.parameter.tpl"
}
}
},
"square_brackets_line_int": {
"match": "\\[(-?\\d+)\\]",
"captures": {
"1": {
"name": "constant.numeric.tpl"
}
}
},
"drdc_jira": {
"match": "\\((DRDC1-\\S+)\\)",
"captures": {
"1": {
"name": "variable.other.tpl"
}
}
},
"sql_query": {
"begin": "(?=\"\"\"(SELECT|INSERT|UPDATE|DELETE|CREATE|REPLACE|ALTER|WITH))",
"end": "(?=\"\"\";)",
"patterns": [
{
"include": "source.sql"
}
]
},
"lines": {
"patterns": [
{
"include": "#qouted_line"
},
{
"include": "#qouted_line_empty"
},
{
"include": "#double_qouted_line"
},
{
"include": "#sql_query"
},
{
"include": "#percent_line"
},
{
"include": "#comment_TODO_line"
},
{
"include": "#comment_line"
},
{
"include": "#regexes"
},
{
"include": "#square_brackets_line_empty"
},
{
"include": "#square_brackets_line_word"
},
{
"include": "#square_brackets_line_int"
},
{
"include": "#all_keys"
},
{
"include": "#drdc_jira"
}
]
},
"plus": {
"match": "\\+",
"name": "keyword.operator.assignment.tpl"
},
"var_assign": {
"match": "\\:\\=",
"name": "keyword.operator.assignment.tpl"
},
"double_q": {
"match": "(\\\"\\\"){1}",
"name": "comment.tpl"
},
"single_q": {
"match": "(\\'\\'){1}",
"name": "comment.tpl"
},
"equal": {
"match": "\\=",
"name": "keyword.operator.assignment.tpl"
},
"less": {
"match": "\\<",
"name": "keyword.operator.tpl"
},
"more": {
"match": "\\>",
"name": "keyword.operator.tpl"
},
"more_equal": {
"match": "\\>\\=",
"name": "keyword.operator.tpl"
},
"less_equal": {
"match": "\\<\\=",
"name": "keyword.operator.tpl"
},
"decimal": {
"match": "\\s\\-\\d+\\s",
"name": "constant.numeric.integer.tpl"
},
"minus_decimal": {
"match": "\\s\\-\\d+\\s",
"name": "constant.numeric.integer.tpl"
},
"just_do": {
"match": "(\\.)",
"name": "punctuation.accessor.tpl",
"captures": {
"1": {
"name": "keyword.operator.tpl"
}
}
},
"all_keys": {
"patterns": [
{
"include": "#var_assign"
},
{
"include": "#equal"
},
{
"include": "#less"
},
{
"include": "#more"
},
{
"include": "#more_equal"
},
{
"include": "#less_equal"
},
{
"include": "#plus"
},
{
"include": "#decimal"
},
{
"include": "#minus_decimal"
},
{
"include": "#just_do"
}
]
},
"regex_token_s_quote": {
"comment": "Catch regex in single quotes",
"begin": "(regex)\\s+?(?=')(.+?)",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "support.function.tpl"
}
},
"end": "(')",
"endCaptures": {
"1": {
"name": "support.function.tpl"
}
},
"patterns": [
{
"include": "#regular_expressions"
}
]
},
"regex_token_d_quote": {
"comment": "Catch regex in double qoutes",
"begin": "(regex)\\s+?(?=\")(.+?)",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "support.function.tpl"
}
},
"end": "(\")",
"endCaptures": {
"1": {
"name": "support.function.tpl"
}
},
"patterns": [
{
"include": "#regular_expressions"
}
]
},
"regex_token_triple_s_quote": {
"comment": "Catch regex in double qoutes",
"begin": "(regex)\\s+?('{3})(.+?)",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "support.function.tpl"
}
},
"end": "('{3})",
"endCaptures": {
"1": {
"name": "support.function.tpl"
}
},
"patterns": [
{
"include": "#regular_expressions"
}
]
},
"regex_token_triple_d_quote": {
"comment": "Catch regex in double qoutes",
"begin": "(regex)\\s+?(\"{3})(.+?)",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "support.function.tpl"
}
},
"end": "(\"{3})",
"endCaptures": {
"1": {
"name": "support.function.tpl"
}
},
"patterns": [
{
"include": "#regular_expressions"
}
]
},
"regexes": {
"patterns": [
{
"include": "#regex_token_triple_s_quote"
},
{
"include": "#regex_token_triple_d_quote"
},
{
"include": "#regex_token_s_quote"
},
{
"include": "#regex_token_d_quote"
}
]
},
"begin_variable_assignment": {
"comment": "Covers beginning assignment of a value to a variable. IN PROGRESS",
"match": "^\\s*(\\w+)\\s*(\\:\\=)",
"captures": {
"1": {
"name": "variable.parameter.tpl"
},
"2": {
"name": "variable.parameter.tpl"
},
"3": {
"name": "keyword.operator.assignment.tpl"
}
}
},
"end_variable_assignment": {
"comment": "Covers ending assignment of a value to a variable. IN PROGRESS",
"match": "(?<=:=)\\s*(\\w+)(;|,)$",
"name": "punctuation.accessor.tpl",
"captures": {
"1": {
"name": "entity.name.type.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
}
}
},
"temp_test": {
"comment": "TEMP TEST PLEASE DELETE",
"match": "(?<=abc)WHAT",
"name": "variable.parameter.tpl",
"captures": {
"1": {
"name": "entity.name.type.tpl"
}
}
},
"discovery_action_functions": {
"comment": "TODO: confirm that Discovery functions DEV is working",
"begin": "(discovery)(\\.)(fileGet|fileInfo|getNames|lookupAddresses|listDirectory|listRegistry|registryKey|wmiQuery|wbemQuery|wbemEnumInstances|runCommand|snmpGet|snmpGetTable|vSphereFindObjects|vSphereTraverseToObjects|vSphereGetProperties|vSphereGetPropertyTable|scan|restfulGet|restfulPost|restfulDelete|restfulPatch|restfulPut)",
"beginCaptures": {
"1": {
"name": "support.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
},
"end": "\\;",
"endCaptures": {
"1": {
"name": "disabled.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#all_controls"
},
{
"include": "#regex"
}
]
},
"discovery_cloud_aws_functions": {
"begin": "(discovery)(\\.)(AWS)(\\.)(AutoScaling|CF|EC2|ELB|ELBv2|RDS|S3)(\\.)((Describe|Get|List)\\w+\\b)",
"beginCaptures": {
"1": {
"name": "support.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "support.function.tpl"
},
"4": {
"name": "punctuation.accessor.tpl"
},
"5": {
"name": "variable.parameter.tpl"
},
"6": {
"name": "punctuation.accessor.tpl"
},
"7": {
"name": "variable.parameter.tpl"
}
},
"end": "\\;",
"endCaptures": {
"1": {
"name": "disabled.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#all_controls"
},
{
"include": "#regex"
}
]
},
"discovery_cloud_azure_functions": {
"comment": "Due to the number of possible matching groups, the whole match is wrapped for punctuation and each sub-group match is colored.",
"begin": "((discovery)\\.(Azure)\\.((Availability|Virtual|LoadBalancers|Network|Public|RouteTables|Providers|ResourceGroups|Subscriptions|Tenants|SQLServers|Storage|AutoScale|AppService)\\w*)\\.(\\w+)?\\.?(\\w+)?\\.?((List|Get)\\w*\\b))",
"beginCaptures": {
"1": {
"name": "punctuation.accessor.tpl"
},
"2": {
"name": "support.function.tpl"
},
"3": {
"name": "support.function.tpl"
},
"4": {
"name": "variable.parameter.tpl"
},
"5": {
"name": "variable.parameter.tpl"
},
"6": {
"name": "variable.parameter.tpl"
},
"7": {
"name": "variable.parameter.tpl"
},
"8": {
"name": "variable.parameter.tpl"
}
},
"end": "\\;",
"endCaptures": {
"1": {
"name": "disabled.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#all_controls"
},
{
"include": "#regex"
}
]
},
"model_functions": {
"comment": "TODO: confirm that Model functions DEV is working",
"begin": "(model)(\\.)(addContainment|setContainment|destroy|withdraw|setRemovalGroup|anchorRemovalGroup|suppressRemovalGroup|host|hosts|findPackages|addDisplayAttribute|removeDisplayAttribute|kind)",
"beginCaptures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "constant.character.escape.tpl"
}
},
"end": "\\;",
"endCaptures": {
"1": {
"name": "disabled.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#all_controls"
},
{
"include": "#regex"
}
]
},
"model_rel_functions": {
"comment": "TODO: confirm that Model rel functions DEV is working",
"begin": "(model)(\\.)(rel|uniquerel)(\\.)(Communication|Containment|Dependency|Detail|FunctionalContainment|HostContainment|HostedFile|HostedSoftware|Management|RelatedFile|SoftwareService|SoftwareContainment|StorageUse)",
"beginCaptures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "support.function.tpl"
},
"4": {
"name": "punctuation.accessor.tpl"
},
"5": {
"name": "constant.character.escape.tpl"
}
},
"end": "\\;",
"endCaptures": {
"1": {
"name": "disabled.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#all_controls"
},
{
"include": "#regex"
},
{
"include": "#model_attribute_assignment"
}
]
},
"model_node_functions": {
"comment": "TODO: confirm that Model SI functions DEV is working. TODO: add more node types. TODO: Finish branch",
"begin": "(model)(\\.)(BusinessApplicationInstance|Detail|FunctionalComponent|SoftwareInstance)",
"beginCaptures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "constant.character.escape.tpl"
}
},
"end": "\\;",
"endCaptures": {
"1": {
"name": "disabled.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#all_controls"
},
{
"include": "#regex"
},
{
"include": "#model_attribute_assignment"
}
]
},
"model_attribute_assignment": {
"comment": "Covers assignment of values to attributes within 'model' and 'model.rel' functions",
"match": "^\\s*(([a-zA-Z]\\w*)\\s*(\\:\\=)\\s*(\\w+))",
"name": "keyword.control.conditional.tpl",
"captures": {
"1": {
"name": "punctuation.accessor.tpl"
},
"2": {
"name": "variable.parameter.tpl"
},
"3": {
"name": "keyword.operator.assignment.tpl"
},
"4": {
"name": "entity.name.type.tpl"
}
}
},
"sync_rel_functions": {
"comment": "confirm all possible namespace functions and arguments",
"begin": "(sync)(\\.)(rel)(\\.)(BMC_Component)",
"beginCaptures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "support.function.tpl"
},
"4": {
"name": "punctuation.accessor.tpl"
},
"5": {
"name": "constant.character.escape.tpl"
}
},
"end": "\\;",
"endCaptures": {
"1": {
"name": "disabled.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#all_controls"
},
{
"include": "#regex"
},
{
"include": "#model_attribute_assignment"
}
]
},
"sync_shared_functions": {
"comment": "confirm all possible namespace functions and arguments",
"begin": "(sync)(\\.)(shared)(\\.)(BMC_BusinessService)",
"beginCaptures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "support.function.tpl"
},
"4": {
"name": "punctuation.accessor.tpl"
},
"5": {
"name": "constant.character.escape.tpl"
}
},
"end": "\\;",
"endCaptures": {
"1": {
"name": "disabled.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#all_controls"
},
{
"include": "#regex"
},
{
"include": "#model_attribute_assignment"
}
]
},
"log_functions": {
"match": "(log)(\\.)(debug|info|warn|error|critical)",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "storage.type.tpl"
}
}
},
"text_functions": {
"match": "(text)(\\.)(lower|upper|toNumber|replace|join|split|strip|leftStrip|rightStrip|hash|ordinal)",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
}
},
"number_functions": {
"match": "(number)(\\.)(toChar|toText|range)",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
}
},
"table_functions": {
"match": "(table\\b)(\\s*\\(|(\\.)(remove))",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "punctuation.accessor.tpl"
},
"4": {
"name": "variable.parameter.tpl"
}
}
},
"regex_functions": {
"match": "(regex)(\\.)(extract|extractAll)",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
}
},
"xpath_functions": {
"match": "(xpath)(\\.)(evaluate|openDocument|closeDocument)",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
}
},
"discovery_manipulation_functions": {
"match": "(discovery)(\\.)(process|children|descendents|parent|allProcesses|access|startTime)",
"captures": {
"1": {
"name": "support.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
}
},
"binary_functions": {
"match": "(binary)(\\.)(toHexString|toIPv4|toIPv4z|toIPv6|toIPv6z|toMACAddress|toValue|toWWN)",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
}
},
"json_functions": {
"match": "(json)(\\.)(encode|decode)",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
}
},
"related_functions": {
"match": "(related)(\\.)(detailContainer|host\\b|hostingNode)",
"captures": {
"1": {
"name": "support.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
}
},
"mail_functions": {
"match": "(mail)(\\.)(send)",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
}
},
"time_functions": {
"match": "(time)(\\.)(current|delta\\b|parseLocal|parseUTC|formatLocal|formatUTC|toTicks|fromTicks|deltaFromTicks)",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
}
},
"system_functions": {
"match": "(system)(\\.)(getOption|cmdbSync)",
"captures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
}
},
"inference_functions": {
"match": "(inference)(\\.)(associate|contributor|primary|relation|withdrawal|destruction)",
"captures": {
"1": {
"name": "support.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
}
},
"ConversionFunctions": {
"match": "(ConversionFunctions)(\\.)(isValidSerialNumber|convertToCharString|convertToBytes)",
"captures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "entity.name.function.tpl"
}
}
},
"DiscoveryFunctions": {
"comment": "These functions come from the TKU Module 'Discovery Functions'",
"match": "(DiscoveryFunctions)(\\.)(pathNormalization|getCleanedupPath|getMaxVersion|getExeCwdPath|sortList|runActiveCommand|locateCommands|checkCommandList)",
"captures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "entity.name.function.tpl"
}
}
},
"RDBMSFunctions": {
"match": "(RDBMSFunctions)(\\.)(oracleOraFileParser|performRdbmsSisSearch|oracleNetServiceNameSearch|dsnRdbmsServers|parseJDBC)",
"captures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "entity.name.function.tpl"
}
}
},
"rdbms_functions": {
"match": "(rdbms_functions)(\\.)(oracle_ora_file_parser|perform_rdbms_sis_search|related_rdbms_sis_search|related_rdbms_sis_search_extended|oracle_net_service_name_search|dsn_rdbms_servers|parseJDBC|jdbc_search|find_db_server)",
"captures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "entity.name.function.tpl"
}
}
},
"SearchFunctions": {
"match": "(SearchFunctions)(\\.)(getNodeIp|getHostingNodes|getSoftwareNodes|getSI|identifyHostWithUuid|relatedSisSearchOnMultipleHosts)",
"captures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "entity.name.function.tpl"
}
}
},
"common_functions": {
"match": "(functions)(\\.)(validate_host_address_format|domain_lookup|identify_host_perform_search|identify_host_perform_search_in_scope|identify_host|identify_host_extended|related_sis_search\\b|related_sis_search_on_multiple_hosts|related_sis_search_on_multiple_hosts_extended|related_sis_search_extended|related_si_types_search|path_normalization|links_management|get_cleanedup_path|get_max_version|get_exe_cwd_path|sort_list|run_priv_cmd|has_process|isValidSerialNumber|convertToCharString|wmiFollowAssociations|checkForDecimal|convertToBytes|identify_host_with_uuid|locateCommands|find_server|checkCommandList)",
"captures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "entity.name.function.tpl"
}
}
},
"local_functions": {
"match": "(local_functions|localFunctions)(\\.)(\\w+)",
"captures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "entity.name.function.tpl"
}
}
},
"list_append": {
"match": "(list)(\\.)(append)",
"captures": {
"1": {
"name": "entity.name.function.tpl"
},
"2": {
"name": "punctuation.accessor.tpl"
},
"3": {
"name": "entity.name.function.tpl"
}
}
},
"all_functions": {
"patterns": [
{
"include": "#discovery_action_functions"
},
{
"include": "#discovery_cloud_aws_functions"
},
{
"include": "#discovery_cloud_azure_functions"
},
{
"include": "#model_functions"
},
{
"include": "#model_node_functions"
},
{
"include": "#model_rel_functions"
},
{
"include": "#sync_rel_functions"
},
{
"include": "#sync_shared_functions"
},
{
"include": "#log_functions"
},
{
"include": "#text_functions"
},
{
"include": "#number_functions"
},
{
"include": "#table_functions"
},
{
"include": "#regex_functions"
},
{
"include": "#xpath_functions"
},
{
"include": "#discovery_manipulation_functions"
},
{
"include": "#binary_functions"
},
{
"include": "#json_functions"
},
{
"include": "#related_functions"
},
{
"include": "#mail_functions"
},
{
"include": "#time_functions"
},
{
"include": "#inference_functions"
},
{
"include": "#system_functions"
},
{
"include": "#ConversionFunctions"
},
{
"include": "#SearchFunctions"
},
{
"include": "#rdbms_functions"
},
{
"include": "#RDBMSFunctions"
},
{
"include": "#DiscoveryFunctions"
},
{
"include": "#common_functions"
},
{
"include": "#local_functions"
},
{
"include": "#list_append"
}
]
},
"node_relationships": {
"comment": "Covers node relationships, does not check for proper relationship names",
"match": "(?i)([a-z]*):([a-z]*):([a-z]*):([a-z]*)",
"name": "keyword.control.conditional.tpl",
"captures": {
"1": {
"name": "variable.parameter.tpl"
},
"2": {
"name": "variable.parameter.tpl"
},
"3": {
"name": "variable.parameter.tpl"
},
"4": {
"name": "variable.parameter.tpl"
}
}
},
"if_statement": {
"comment": "Match if ..values.. then and include usual lines. #lines can override some marks",
"begin": "(?!end if;|then)(\\bif)",
"beginCaptures": {
"1": {
"name": "keyword.control.conditional.tpl"
}
},
"end": "(\\bthen)",
"endCaptures": {
"1": {
"name": "keyword.control.conditional.tpl"
}
},
"patterns": [
{
"include": "#all_controls"
},
{
"include": "#regexes"
},
{
"include": "#all_keys"
},
{
"include": "#lines"
},
{
"include": "#keywords_attrs"
},
{
"include": "#all_functions"
}
]
},
"elif_statement": {
"comment": "Match elif ..values.. then and include usual lines. #lines can override some marks",
"begin": "(?!end if;|then)(\\belif)",
"beginCaptures": {
"1": {
"name": "keyword.control.conditional.tpl"
}
},
"end": "(\\bthen)",
"endCaptures": {
"1": {
"name": "keyword.control.conditional.tpl"
}
},
"patterns": [
{
"include": "#all_controls"
},
{
"include": "#regexes"
},
{
"include": "#all_keys"
},
{
"include": "#lines"
},
{
"include": "#keywords_attrs"
},
{
"include": "#all_functions"
}
]
},
"else_statement": {
"match": "\\belse\\b",
"name": "keyword.control.conditional.tpl"
},
"end_if_statement": {
"match": "(?!;|if|else\\w)\\bend\\b\\s\\bif\\b;",
"name": "keyword.control.conditional.tpl"
},
"for_statement": {
"comment": "TODO: Confirm logic is accurate",
"begin": "^\\s*(for\\b)(?!;)",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"end": "(\\bdo\\b)",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#regex"
},
{
"include": "#lines"
},
{
"include": "#all_controls"
}
]
},
"end_for_statement": {
"match": "\\bend\\sfor;\\s+?",
"name": "keyword.control.tpl"
},
"keywords_all": {
"match": "\\b(size|in|aged|and|as|at|break|by|configuration|continue|created|default|desc|deleted|do|enumeration|exists|expand|explode|false|flags|from|has|in|is|locale|matches|modified|nodes|nodecount|none|not|on|or|order|out|overrides|processwith|relationship|removal|requires|search|show|step|stop|substring|subword|summary|tags|taxonomy|traverse|true|unconfirmed|where|with|void|has|substring)\\b",
"name": "storage.type.class.tpl"
},
"keywords_cmd": {
"match": "\\b(unix_cmd|windows_cmd)",
"captures": {
"1": {
"name": "keyword.operator.tpl"
}
}
},
"keywords_cmd_indentify_trigger": {
"match": "\\b(unix_cmd|windows_cmd|cmd|args)",
"captures": {
"1": {
"name": "keyword.operator.tpl"
}
}
},
"if_ADDM_statement": {
"match": "(#IFADDM)\\s+(\\d+.\\d+)",
"captures": {
"1": {
"name": "keyword.control.conditional.tpl"
},
"2": {
"name": "constant.numeric.tpl"
}
}
},
"elif_ADDM_statement": {
"match": "(#ELIFADDM)\\s+(\\d+.\\d+)",
"captures": {
"1": {
"name": "keyword.control.conditional.tpl"
},
"2": {
"name": "constant.numeric.tpl"
}
}
},
"else_ADDM_statement": {
"match": "#ELSE\\s+?",
"name": "keyword.control.conditional.tpl"
},
"end_if_ADDM_statement": {
"match": "#ENDIFADDM\\s+?",
"name": "keyword.control.conditional.tpl"
},
"if_addm": {
"patterns": [
{
"include": "#if_ADDM_statement"
},
{
"include": "#elif_ADDM_statement"
},
{
"include": "#else_ADDM_statement"
},
{
"include": "#end_if_ADDM_statement"
}
]
},
"all_controls": {
"patterns": [
{
"include": "#if_statement"
},
{
"include": "#elif_statement"
},
{
"include": "#else_statement"
},
{
"include": "#end_if_statement"
},
{
"include": "#for_statement"
},
{
"include": "#end_for_statement"
},
{
"include": "#if_addm"
},
{
"include": "#keywords_all"
},
{
"include": "#keywords_cmd"
},
{
"include": "#all_keys"
},
{
"include": "#node_relationships"
},
{
"include": "#begin_variable_assignment"
},
{
"include": "#end_variable_assignment"
},
{
"include": "#temp_test"
}
]
},
"doc_strings_block_doulbe_q": {
"comment": "TRIGGER TYPE Working fine and DATE & TASK highlighted Adding SQL support via #lines",
"begin": "(\\\"{3})",
"beginCaptures": {
"1": {
"name": "comment.block.documentation.tpl"
}
},
"end": "(\\\"{3})",
"contentName": "comment.block.documentation.tpl",
"endCaptures": {
"1": {
"name": "comment.block.documentation.tpl"
}
},
"patterns": [
{
"name": "variable.parameter.tpl",
"match": "(\\d{2,4}\\-\\d{2,4}\\-\\d{2,4}).*?(\\d{2,4}\\-\\d{2,4}\\-\\d{2,4})?",
"captures": {
"1": {
"name": "variable.other.tpl"
}
}
},
{
"name": "variable.parameter.tpl",
"match": "\\((QM\\d+)\\)",
"captures": {
"1": {
"name": "variable.other.tpl"
}
}
},
{
"name": "variable.parameter.tpl",
"match": "\\((DRDC1-\\d+)\\)",
"captures": {
"1": {
"name": "variable.other.tpl"
}
}
},
{
"name": "variable.parameter.tpl",
"match": "\\((TKU-\\d+)\\)",
"captures": {
"1": {
"name": "variable.other.tpl"
}
}
},
{
"name": "variable.parameter.tpl",
"match": "\\((esc\\s+?\\d+)\\)",
"captures": {
"1": {
"name": "variable.other.tpl"
}
}
}
]
},
"doc_strings_block_single_q": {
"comment": "TRIGGER TYPE Working fine and DATETASK highlighted",
"begin": "('{3})",
"beginCaptures": {
"1": {
"name": "comment.block.documentation.tpl"
}
},
"end": "('{3})",
"contentName": "comment.block.documentation.tpl",
"endCaptures": {
"1": {
"name": "comment.block.documentation.tpl"
}
},
"patterns": [
{
"name": "variable.parameter.tpl",
"match": "(\\d{2,4}\\-\\d{2,4}\\-\\d{2,4}).*?(\\d{2,4}\\-\\d{2,4}\\-\\d{2,4})?",
"captures": {
"1": {
"name": "variable.other.tpl"
}
}
},
{
"name": "variable.parameter.tpl",
"match": "\\((QM\\d+)\\)",
"captures": {
"1": {
"name": "variable.other.tpl"
}
}
},
{
"name": "variable.parameter.tpl",
"match": "\\((DRDC1-\\d+)\\)",
"captures": {
"1": {
"name": "variable.other.tpl"
}
}
},
{
"name": "variable.parameter.tpl",
"match": "\\((TKU-\\d+)\\)",
"captures": {
"1": {
"name": "variable.other.tpl"
}
}
},
{
"name": "variable.parameter.tpl",
"match": "\\((esc\\s+?\\d+)\\)",
"captures": {
"1": {
"name": "variable.other.tpl"
}
}
}
]
},
"doc_strings_single_simple": {
"comment": "Adding SQL support via #lines",
"name": "comment.block.documentation.tpl",
"match": "('{3}([^']+?)'{3})",
"captures": {
"1": {
"name": "string.quoted.triple.tpl"
},
"2": {
"name": "string.quoted.triple.tpl"
},
"3": {
"name": "string.quoted.triple.tpl"
}
}
},
"doc_strings": {
"patterns": [
{
"include": "#doc_strings_block_doulbe_q"
},
{
"include": "#doc_strings_block_single_q"
},
{
"include": "#doc_strings_single_simple"
}
]
},
"define": {
"comment": "Adding SQL support via #lines",
"begin": "\\s*(define)\\s+(\\S+)\\((.*?)\\)(\\s\\S+\\s(.*))?",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "entity.name.function.tpl"
},
"3": {
"name": "variable.parameter.tpl"
},
"4": {
"name": "constant.numeric.tpl"
}
},
"end": "\\s*(end\\sdefine;\\s+?$)",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#doc_strings"
},
{
"include": "#all_functions"
},
{
"include": "#all_controls"
},
{
"include": "#if_addm"
},
{
"include": "#dev_keys"
},
{
"include": "#lines"
}
]
},
"alt_define": {
"comment": "Adding SQL support via #lines",
"begin": "\\s*(define)\\s+(\\S+)(\\s\\S+\\s(.*))?",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "entity.name.function.tpl"
},
"3": {
"name": "variable.parameter.tpl"
}
},
"end": "\\s*(end\\sdefine;)",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#doc_strings"
},
{
"include": "#all_functions"
},
{
"include": "#all_controls"
},
{
"include": "#if_addm"
},
{
"include": "#dev_keys"
},
{
"include": "#lines"
}
]
},
"simple_identifiers": {
"begin": "\\b(identify)\\s+(\\w+)\\s(\\d+(?:\\.\\d+)+)",
"beginCaptures": {
"1": {
"name": "keyword.control.tpl"
},
"2": {
"name": "entity.name.function"
},
"3": {
"name": "constant.numeric.tpl"
}
},
"end": "(end\\sidentify;)",
"endCaptures": {
"1": {
"name": "keyword.control.tpl"
}
},
"patterns": [
{
"include": "#lines"
},
{
"include": "#keywords_cmd"
},
{
"include": "#keywords_all"
},
{
"include": "#regexes"
},
{
"include": "#keywords_cmd_indentify_trigger"
},
{
"include": "#if_addm"
}
]
},
"keywords_attributes": {
"patterns": [
{
"include": "#keywords_attrs"
}
]
},
"keywords_attrs": {
"comment": "Changed disabled to 1 to turn off DEV highlighting.",
"disabled": 0,
"match": "\\b(key_group|key|name|type|version|short_name|install_root|listening_ports|product_version|full_version)\\b",
"captures": {
"1": {
"name": "storage.type.tpl"
}
}
},
"traverse": {
"name": "entity.name.function.model",
"match": "\\#(?:(\\w+)(:|\\.))+(\\w+)",
"captures": {
"3": {
"name": "keyword.control.model"
}
}
},
"regular_expressions": {
"comment": "Changed disabled to 1 to turn off syntax highlighting in “r” strings.",
"disabled": 0,
"patterns": [
{
"include": "source.regexp.tpl"
}
]
},
"dev_keys": {
"patterns": [
{
"include": "#keywords_attributes"
},
{
"include": "#traverse"
}
]
}
}
}