{ "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", "name": "erpc", "patterns": [{ "include": "#multilineCommentsDocument" }, { "include": "#multilineCommentsDocument2" }, { "include": "#multilineComments" }, { "include": "#comments" }, { "include": "#annotations" }, { "include": "#annotationsKeywords" }, { "include": "#enums" }, { "include": "#structs" }, { "include": "#structsMembers" }, { "include": "#unions" }, { "include": "#unionsDiscriminator" }, { "include": "#members" }, { "include": "#typeNames" }, { "include": "#functionTypeNames" }, { "include": "#returnTypes" }, { "include": "#keywords" }, { "include": "#strings" } ], "repository": { "keywords": { "patterns": [{ "name": "keyword.control.erpc", "match": "\\b(const|enum|in|inout|interface|oneway|out|program|struct|type|import|union|case|default|list)\\b" }, { "name": "entity.name.type", "match": "\\b(binary|bool|uint8|uint16|uint32|int8|int16|int32|void|float|string|int64|uint64)\\b" }, { "name": "keyword.other.erpc", "match": "[{}(),=\\-<>;\\[\\]+*/;]" }] }, "strings": { "name": "string.quoted.double.erpc", "begin": "\"", "end": "\"", "patterns": [{ "name": "constant.character.escape.erpc", "match": "\\\\." }] }, "comments": { "name": "comment.line.erpc", "match": "\\s*//.*" }, "multilineCommentsDocument": { "name": "comment.block.documentation.erpc", "begin": "\\s*/\\*\\*", "end": "\\*/" }, "multilineCommentsDocument2": { "name": "comment.block.documentation.erpc", "begin": "\\s*/\\*\\!", "end": "\\*/" }, "multilineComments": { "name": "comment.block.erpc", "begin": "\\s*/\\*", "end": "\\*/" }, "annotations": { "name": "support.property-value.erpc", "begin": "@[^\\(]*\\(", "end": "\\)", "patterns": [{ "name": "string.quoted.double.erpc", "match": "\"[^)]*" }, { "name": "string.unquoted.erpc", "match": "[^\")][^)]*" }] }, "annotationsKeywords": { "name": "support.property-value.erpc", "begin": "@[^\\(\\n]*", "end": "\n" }, "enums": { "name": "keyword.control.erpc", "match": "enum\\s+([a-zA-Z0-9_]+)", "captures": { "1": { "name": "entity.name.type.erpc" } } }, "structs": { "name": "keyword.control.erpc", "match": "struct\\s+([a-zA-Z0-9_]+)", "captures": { "1": { "name": "entity.name.type.erpc" } } }, "structsMembers": { "name": "variable.name", "match": "\\s*(byref\\s)?\\s*([a-zA-Z0-9_]*)\\s+([a-zA-Z0-9_]*)(\\s+@[a-zA-Z0-9_]+(\\(a-zA-Z0-9_]+\\))?)?(\\s*;)?(\\s*/[*/].*)?\\s*\n", "captures": { "1": { "name": "keyword.control.erpc" }, "2": { "name": "entity.name.type.erpc" }, "6": { "name": "keyword.other.erpc" }, "7": { "name": "comment.line.erpc" } } }, "unions": { "name": "keyword.control.erpc", "match": "union\\s+([a-zA-Z0-9_]+)", "captures": { "1": { "name": "entity.name.type.erpc" } } }, "unionsDiscriminator": { "name": "keyword.control.erpc", "match": "union\\s*\\(([a-zA-Z0-9_]+)\\)", "captures": { "1": { "name": "entity.name.type.erpc" } } }, "typeNames": { "name": "keyword.control.erpc", "match": "type\\s+([^=]*)=\\s*([a-zA-Z0-9_]+)", "captures": { "1": { "name": "entity.name.type.erpc" }, "2": { "patterns": [{ "include": "#keywords" },{ "name": "entity.name.type.erpc", "match": "[a-zA-Z0-9_]+" }] } } }, "functionTypeNames": { "begin": "\\(", "end": "\\)", "patterns": [{ "include": "#keywords" },{ "name": "", "match": "(in\\s|out\\s|inout\\s+)?([a-zA-Z0-9_\\[\\]]+\\s+)([a-zA-Z0-9_]+)(\\s+@[a-zA-Z0-9_]+(\\(a-zA-Z0-9_]+\\))?)?", "captures": { "1": { "name": "keyword.control.erpc" }, "2": { "name": "entity.name.type.erpc" }, "3": { "name": "variable.name.erpc" } } }] }, "returnTypes": { "name": "keyword.other.erpc", "begin" :"->\\s*", "end": "[\\n\\s]", "patterns": [{ "include": "#keywords" },{ "name": "entity.name.type.erpc", "match":"[a-zA-Z0-9_]+" }] } }, "scopeName": "source.erpc" }