{ "name": "Ballerina", "scopeName": "source.ballerina", "patterns": [ { "begin": "\\b(function|service|resource|connector|action|worker)\\b", "end": "(\\(|\\{)", "patterns": [ { "name": "entity.name.function.ballerina", "match": "([_$[:alpha:]][_$[:alnum:]]*) | (\\|.+\\|)" } ], "beginCaptures": { "0": { "name": "keyword.other.function-name.ballerina" } } }, { "begin": "\\b(documentation)\\s*(\\{)", "end": "\\}", "patterns": [ { "name": "string.quoted.double.ballerina", "match": "." } ], "beginCaptures": { "1": { "name": "keyword.other.ballerina" }, "2": { "name": "punctuation.definition.block.ballerina" } }, "endCaptures": { "0": { "name": "punctuation.definition.block.ballerina" } } }, { "include": "#keywords" }, { "name": "string.quoted.double.ballerina", "begin": "\\\"", "end": "\\\"", "patterns": [ { "name": "constant.character.escape.ballerina", "match": "\\\\." } ], "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.ballerina" } }, "endCaptures": { "0": { "name": "punctuation.definition.string.end.ballerina" } } }, { "name": "comment.block.ballerina", "match": "\\s*((//).*$\\n?)" }, { "name": "storage.type.annotation.ballerina", "match": "@[a-zA-Z_$][a-zA-Z0-9_$]*" } ], "repository": { "keywords": { "patterns": [ { "name": "keyword.control.ballerina", "match": "\\b(if|else|iterator|try|catch|finally|fork|join|all|some|while|throw|return|returns|break|timeout|transaction|aborted|abort|committed|failed|retries|next|bind|with|lengthof|typeof|enum)\\b" }, { "name": "keyword.other.ballerina", "match": "\\b(import|version|public|attach|as|native|documentation|lock)\\b" }, { "name": "storage.type.ballerina", "match": "\\b(boolean|int|float|string|var|any|datatable|blob)\\b" }, { "name": "storage.type.ballerina", "match": "\\b(map|exception|json|xml|xmlns|error)\\b" }, { "name": "keyword.other.ballerina", "match": "\\b(annotation|package|type|connector|function|resource|service|action|worker|struct|transformer|endpoint)\\b" }, { "name": "keyword.other.ballerina", "match": "\\b(const|true|false|reply|create|parameter)\\b" }, { "name": "keyword.operator.ballerina", "match": "(!|%|\\+|\\-|~=|==|=|!=|\u003c|\u003e|\u0026\u0026|\\|\\|)" } ] } } }