diff --git a/vscode/syntaxes/qsharp.tmLanguage.json b/vscode/syntaxes/qsharp.tmLanguage.json index 051efa236a..d9c390c2a3 100644 --- a/vscode/syntaxes/qsharp.tmLanguage.json +++ b/vscode/syntaxes/qsharp.tmLanguage.json @@ -6,6 +6,9 @@ { "include": "#comments" }, + { + "include": "#functions" + }, { "include": "#keywords" }, @@ -20,6 +23,9 @@ }, { "include": "#strings" + }, + { + "include": "#variables" } ], "repository": { @@ -35,6 +41,103 @@ } ] }, + "functions": { + "patterns": [ + { + "comment": "function definition", + "name": "meta.function.definition.qsharp", + "begin": "\\b(function)\\s+([A-Za-z0-9_]+)(\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.qsharp" + }, + "2": { + "name": "entity.name.function.qsharp" + }, + "3": { + "name": "punctuation.brackets.round.qsharp" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.brackets.round.qsharp" + } + }, + "patterns": [ + { + "include": "#comments" + }, + { + "include": "#functions" + }, + { + "include": "#keywords" + }, + { + "include": "#operators" + }, + { + "include": "#types" + }, + { + "include": "#constants" + }, + { + "include": "#strings" + }, + { + "include": "#variables" + } + ] + }, + { + "comment": "function calls", + "name": "meta.function.call.qsharp", + "begin": "\\b(?