From 9a2be3192238422b77bdcf960f2d336df4d5d36c Mon Sep 17 00:00:00 2001 From: Yuuki Wesp Date: Thu, 2 May 2024 14:42:17 +0300 Subject: [PATCH] return json version --- .gitignore | 1 - grammars/vein.tmLanguage.json | 1985 +++++++++++++++++++++++++++++++++ 2 files changed, 1985 insertions(+), 1 deletion(-) create mode 100644 grammars/vein.tmLanguage.json diff --git a/.gitignore b/.gitignore index 786628e..bd26321 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,6 @@ node_modules/ out/ .vscode/ -grammars/*.json npm-debug.log* copy.sh test/ diff --git a/grammars/vein.tmLanguage.json b/grammars/vein.tmLanguage.json new file mode 100644 index 0000000..ccbfcd4 --- /dev/null +++ b/grammars/vein.tmLanguage.json @@ -0,0 +1,1985 @@ +{ + "information_for_contributors": [ + "This file has been converted from https://github.com/vein-lang/tmLanguage/blob/master/grammars/vein.tmLanguage", + "If you want to provide a fix or improvement, please create a pull request against the original repository.", + "Once accepted there, we are happy to receive an update request." + ], + "version": "https://github.com/vein-lang/tmLanguage/commit/8b9f9f9c1720e3f86ec4adfe278caae882f29309", + "$schema": "https://raw.githubusercontent.com/martinring/tmlanguage/master/tmlanguage.json", + "scopeName": "source.vein", + "name": "Vein Language", + "patterns": [ + { + "include": "#global_keywords" + }, + { + "include": "#operation-declaration" + }, + { + "include": "#comment" + }, + { + "include": "#preprocessor" + }, + { + "include": "#inline-class-declaration" + }, + { + "include": "#class-declaration" + }, + { + "include": "#operators" + }, + { + "include": "#keywords" + }, + { + "include": "#strings" + }, + { + "include": "#interpolated-string" + }, + { + "include": "#storage-types" + }, + { + "include": "#storage-modifier" + }, + { + "include": "#backslash-escapes" + }, + { + "include": "#union-declaration" + }, + { + "include": "#typdef-declaration" + }, + { + "include": "#types" + }, + { + "include": "#literal" + } + ], + "repository": { + "declarations": { + "patterns": [ + { + "include": "#type-declarations" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "comment": { + "patterns": [ + { + "name": "comment.block.vein", + "begin": "/\\*", + "beginCaptures": { + "0": { + "name": "punctuation.definition.comment.vein" + } + }, + "end": "\\*/", + "endCaptures": { + "0": { + "name": "punctuation.definition.comment.vein" + } + } + }, + { + "begin": "(^\\s+)?(?=//)", + "beginCaptures": { + "1": { + "name": "punctuation.whitespace.comment.leading.vein" + } + }, + "end": "(?=$)", + "patterns": [ + { + "name": "comment.block.documentation.vein", + "begin": "(?>=|\\|=", + "name": "keyword.operator.assignment.compound.bitwise.vein" + }, + { + "match": "<<|>>", + "name": "keyword.operator.bitwise.shift.vein" + }, + { + "match": "!=|<=|>=|==|<|>", + "name": "keyword.operator.comparison.vein" + }, + { + "match": "&&|!|\\|\\|", + "name": "keyword.operator.logical.vein" + }, + { + "match": "&|\\||\\^|~", + "name": "keyword.operator.vein" + }, + { + "match": "=", + "name": "keyword.operator.assignment.vein" + }, + { + "match": "%|\\*|/|-|\\+", + "name": "keyword.operator.vein" + } + ] + }, + "keywords": { + "patterns": [ + { + "name": "keyword.control.vein", + "match": "(?[a-zA-Z0-9]+)\\s?+\\:\\s?+(?[a-zA-Z0-9]+))(,?)+", + "captures": { + "2": { + "name": "entity.name.variable.local.vein" + }, + "3": { + "name": "entity.name.type" + } + } + }, + { + "name": "entity.name.type.class.vein", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-accessor" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.vein" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.vein" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#property-declaration" + }, + { + "include": "#field-declaration" + }, + { + "include": "#indexer-declaration" + }, + { + "include": "#punctuation-semicolon" + }, + { + "include": "#operation-declaration" + }, + { + "include": "#union-declaration" + }, + { + "include": "#constructor-declaration" + }, + { + "include": "#destructor-declaration" + }, + { + "include": "#storage-modifier" + }, + { + "include": "#method-declaration" + }, + { + "include": "#attribute-section" + } + ] + } + ] + }, + "class-declaration": { + "begin": "\\b(class|struct|contract|extensions|interface)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.class.vein" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#comment" + }, + { + "name": "entity.name.type.class.vein", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-accessor" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.vein" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.vein" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#property-declaration" + }, + { + "include": "#field-declaration" + }, + { + "include": "#indexer-declaration" + }, + { + "include": "#punctuation-semicolon" + }, + { + "include": "#operation-declaration" + }, + { + "include": "#union-declaration" + }, + { + "include": "#storage-modifier" + }, + { + "include": "#constructor-declaration" + }, + { + "include": "#destructor-declaration" + }, + { + "include": "#method-declaration" + }, + { + "include": "#attribute-section" + } + ] + } + ] + }, + "indexer-declaration": { + "begin": "(this)(?>\\s?+)\\[(.+)\\](?>\\s?+)\\:(?>\\s?+)(@?[_[:alpha:]][_[:alnum:]]*)", + "beginCaptures": { + "1": { + "name": "keyword.control.vein" + }, + "2": { + "patterns": [ + { + "include": "#operation-argument-list" + } + ] + }, + "3": { + "name": "entity.name.type" + } + }, + "end": "(?=;)", + "patterns": [ + { + "name": "entity.name.variable.field.vein", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#class-or-struct-members" + }, + { + "include": "#literal" + } + ] + }, + "field-declaration": { + "begin": "(@?[_[:alpha:]][_[:alnum:]]*)(?>\\s?+)\\:(?>\\s?+)(@?[_[:alpha:]][_[:alnum:]]*)\\s*(?!=>|==)(?=,|;|=|$)", + "beginCaptures": { + "1": { + "name": "entity.name.variable.field.vein" + }, + "2": { + "name": "entity.name.type" + } + }, + "end": "(?=;)", + "patterns": [ + { + "name": "entity.name.variable.field.vein", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#class-or-struct-members" + }, + { + "include": "#expression" + } + ] + }, + "constructor-declaration": { + "begin": "(new)(?>\\s?+)\\(((?>.)+)?\\)", + "beginCaptures": { + "1": { + "name": "keyword.other.new.vein" + }, + "2": { + "patterns": [ + { + "include": "#operation-argument-list" + } + ] + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#generic-constraints" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + }, + { + "include": "#shortform-expression" + } + ] + }, + "destructor-declaration": { + "begin": "(?\\s?+)\\(((?>.)+)?\\)", + "beginCaptures": { + "1": { + "name": "keyword.other.new.vein" + }, + "2": { + "patterns": [ + { + "include": "#operation-argument-list" + } + ] + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#generic-constraints" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + }, + { + "include": "#shortform-expression" + } + ] + }, + "method-declaration": { + "begin": "(?@?[_[:alpha:]][_[:alnum:]]*)(?>\\s?+)\\(((?>.)+)?\\)(?>\\s?+)\\:(?>\\s?+)(@?[_[:alpha:]][_[:alnum:]]*)\\s?+(\\|\\>)?", + "beginCaptures": { + "1": { + "name": "entity.name.function.vein" + }, + "2": { + "patterns": [ + { + "include": "#operation-argument-list" + } + ] + }, + "3": { + "name": "entity.name.type" + } + }, + "end": "(?<=\\})|(?=;)", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#global_keywords" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#generic-constraints" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + }, + { + "include": "#invocation-expression" + }, + { + "include": "#shortform-expression" + } + ] + }, + "shortform-expression": { + "begin": "(\\|>)\\s?+", + "beginCaptures": { + "1": { + "name": "entity.operator.pipe.vein" + } + }, + "end": "(?=;)", + "patterns": [ + { + "include": "#expression-call" + }, + { + "include": "#fail-statement" + }, + { + "include": "#expression" + }, + { + "include": "#comment" + }, + { + "include": "#global_keywords" + }, + { + "include": "#expression-call" + } + ] + }, + "typdef-declaration": { + "begin": "(\\#typedef)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.other.typedef.vein" + } + }, + "end": "(?<=\\=)", + "patterns": [ + { + "include": "#comment" + }, + { + "name": "entity.name.type.class.vein", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-accessor" + }, + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.vein" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.vein" + } + }, + "patterns": [ + { + "include": "#punctuation-semicolon" + } + ] + } + ] + }, + "block": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.vein" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.vein" + } + }, + "patterns": [ + { + "include": "#statement" + } + ] + }, + "statement": { + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#while-statement" + }, + { + "include": "#do-statement" + }, + { + "include": "#for-statement" + }, + { + "include": "#foreach-statement" + }, + { + "include": "#if-statement" + }, + { + "include": "#else-part" + }, + { + "include": "#switch-statement" + }, + { + "include": "#goto-statement" + }, + { + "include": "#return-statement" + }, + { + "include": "#fail-statement" + }, + { + "include": "#break-or-continue-statement" + }, + { + "include": "#throw-statement" + }, + { + "include": "#yield-statement" + }, + { + "include": "#await-statement" + }, + { + "include": "#try-statement" + }, + { + "include": "#checked-unchecked-statement" + }, + { + "include": "#lock-statement" + }, + { + "include": "#using-statement" + }, + { + "include": "#labeled-statement" + }, + { + "include": "#local-declaration" + }, + { + "include": "#block" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "for-statement": { + "begin": "(?", + "endCaptures": { + "0": { + "name": "punctuation.definition.typeparameters.end.vein" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#type" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "line_continuation_character": { + "patterns": [ + { + "match": "(\\\\)\\n", + "captures": { + "1": { + "name": "constant.character.escape.line-continuation.vein" + } + } + } + ] + }, + "backslash-escapes": { + "match": "(?x)\\\\ (\n\\\\\t\t\t |\n[abefnprtv'\"?] |\n[0-3][0-7]{,2}\t |\n[4-7]\\d?\t\t|\nx[a-fA-F0-9]{,2} |\nu[a-fA-F0-9]{,4} |\nU[a-fA-F0-9]{,8} )", + "name": "constant.character.escape.vein" + }, + "strings": { + "patterns": [ + { + "begin": "\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.vein" + } + }, + "end": "\"", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.vein" + } + }, + "name": "string.quoted.double.vein", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#string_placeholder" + }, + { + "include": "#line_continuation_character" + } + ] + }, + { + "begin": "'", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.vein" + } + }, + "end": "'", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.vein" + } + }, + "name": "string.quoted.single.vein", + "patterns": [ + { + "include": "#string_escaped_char" + }, + { + "include": "#line_continuation_character" + } + ] + } + ] + }, + "interpolated-string": { + "name": "string.quoted.double.vein", + "begin": "\\$\"", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.vein" + } + }, + "end": "(\")|((?:[^\\\\\\n])$)", + "endCaptures": { + "1": { + "name": "punctuation.definition.string.end.vein" + }, + "2": { + "name": "invalid.illegal.newline.vein" + } + }, + "patterns": [ + { + "include": "#string-character-escape" + }, + { + "include": "#interpolation" + } + ] + }, + "interpolation": { + "name": "meta.interpolation.vein", + "begin": "(?<=[^\\{]|^)((?:\\{\\{)*)(\\{)(?=[^\\{])", + "beginCaptures": { + "1": { + "name": "string.quoted.double.vein" + }, + "2": { + "name": "punctuation.definition.interpolation.begin.vein" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.definition.interpolation.end.vein" + } + }, + "patterns": [ + { + "include": "#expression" + } + ] + }, + "expression": { + "patterns": [ + { + "include": "#preprocessor" + }, + { + "include": "#comment" + }, + { + "include": "#global_keywords" + }, + { + "include": "#checked-unchecked-expression" + }, + { + "include": "#typeof-or-default-expression" + }, + { + "include": "#nameof-expression" + }, + { + "include": "#throw-expression" + }, + { + "include": "#interpolated-string" + }, + { + "include": "#verbatim-interpolated-string" + }, + { + "include": "#this-or-base-expression" + }, + { + "include": "#conditional-operator" + }, + { + "include": "#expression-operators" + }, + { + "include": "#await-expression" + }, + { + "include": "#query-expression" + }, + { + "include": "#as-expression" + }, + { + "include": "#is-expression" + }, + { + "include": "#anonymous-method-expression" + }, + { + "include": "#object-creation-expression" + }, + { + "include": "#array-creation-expression" + }, + { + "include": "#anonymous-object-creation-expression" + }, + { + "include": "#invocation-expression" + }, + { + "include": "#member-access-expression" + }, + { + "include": "#element-access-expression" + }, + { + "include": "#cast-expression" + }, + { + "include": "#literal" + }, + { + "include": "#parenthesized-expression" + }, + { + "include": "#tuple-deconstruction-assignment" + }, + { + "include": "#initializer-expression" + }, + { + "include": "#expression-call" + }, + { + "include": "#identifier" + } + ] + }, + "expression-call": { + "name": "expression.invocation.vein", + "begin": "(?x)([_$a-zA-Z][$\\w]*)\\s*\\(", + "beginCaptures": { + "1": { + "name": "entity.name.function.member" + } + }, + "end": "(?=;|\\))", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#string-literal" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#expression-body" + }, + { + "include": "#argument-list-raw" + } + ] + }, + "argument-list-raw": { + "match": "\\,?\\s*((?:\\w+)+)\\s*", + "captures": { + "1": { + "name": "argument.item.vein", + "patterns": [ + { + "include": "#argument" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + } + } + }, + "identifier": { + "name": "variable.other.readwrite.vein", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + "literal": { + "patterns": [ + { + "include": "#boolean-literal" + }, + { + "include": "#null-literal" + }, + { + "include": "#numeric-literal" + }, + { + "include": "#char-literal" + }, + { + "include": "#string-literal" + }, + { + "include": "#verbatim-string-literal" + }, + { + "include": "#tuple-literal" + } + ] + }, + "boolean-literal": { + "patterns": [ + { + "name": "constant.language.boolean.true.vein", + "match": "(?@?[_[:alpha:]][_[:alnum:]]*)(?<(\\S)>)?(\\(.+?\\)?)\\s?+(:)\\s?+(\\S+)(\\s?+(where)\\s?+(\\S+)\\s?+(is)\\s?+(struct|class))?", + "beginCaptures": { + "1": { + "name": "keyword.control.vein" + }, + "2": { + "name": "entity.name.function.vein" + }, + "4": { + "name": "constant.numeric.generic.vein" + }, + "5": { + "patterns": [ + { + "include": "#operation-argument-list" + } + ] + }, + "6": { + "name": "keyword.operator.vein" + }, + "7": { + "name": "entity.name.type" + }, + "9": { + "name": "keyword.type" + }, + "10": { + "name": "constant.numeric.generic.vein" + }, + "11": { + "name": "keyword.type" + }, + "12": { + "name": "keyword.type" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#gc-modifier" + }, + { + "include": "#sync-modifier" + }, + { + "include": "#body-operation-statament" + } + ] + }, + "class-or-struct-members": { + "patterns": [ + { + "include": "#preprocessor" + }, + { + "include": "#comment" + }, + { + "include": "#type-declarations" + }, + { + "include": "#property-declaration" + }, + { + "include": "#field-declaration" + }, + { + "include": "#event-declaration" + }, + { + "include": "#indexer-declaration" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#constructor-declaration" + }, + { + "include": "#destructor-declaration" + }, + { + "include": "#storage-modifier" + }, + { + "include": "#operator-declaration" + }, + { + "include": "#conversion-operator-declaration" + }, + { + "include": "#tor-declaration" + }, + { + "include": "#method-declaration" + }, + { + "include": "#attribute-section" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "argument-list": { + "begin": "\\(", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.vein" + } + }, + "end": "\\)", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.vein" + } + }, + "patterns": [ + { + "include": "#argument" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "operation-argument-list": { + "match": "((?[a-zA-Z0-9]+)\\s?+\\:\\s?+(?[a-zA-Z0-9]+))(,?)+", + "captures": { + "2": { + "name": "entity.name.variable.local.vein" + }, + "3": { + "name": "entity.name.type" + } + } + }, + "declaration-expression-local": { + "match": "((?[a-zA-Z0-9]+)\\s?+\\:\\s?+(?[a-zA-Z0-9]+))(,?)+", + "captures": { + "2": { + "name": "entity.name.variable.local.vein" + }, + "3": { + "name": "entity.name.type" + } + } + }, + "argument": { + "patterns": [ + { + "name": "storage.modifier.vein", + "match": "\\b(ref|out|in)\\b" + }, + { + "include": "#global_keywords" + }, + { + "include": "#declaration-expression-local" + } + ] + }, + "parenthesized-parameter-list": { + "begin": "(\\()", + "beginCaptures": { + "0": { + "name": "punctuation.parenthesis.open.vein" + } + }, + "end": "(\\))", + "endCaptures": { + "0": { + "name": "punctuation.parenthesis.close.vein" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#attribute-section" + }, + { + "include": "#parameter" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#variable-initializer" + } + ] + }, + "property-declaration": { + "begin": "(@?[_[:alpha:]][_[:alnum:]]*)(?>\\s?+)\\:(?>\\s?+)(@?[_[:alpha:]][_[:alnum:]]*)\\s*(?=\\{|=>|\\|\\>|$)", + "beginCaptures": { + "1": { + "name": "entity.name.variable.field.vein" + }, + "2": { + "name": "entity.name.type" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#property-accessors" + }, + { + "include": "#expression-body" + }, + { + "include": "#variable-initializer" + }, + { + "include": "#class-or-struct-members" + }, + { + "include": "#expression" + } + ] + }, + "local-variable-declaration": { + "begin": "(?x)\n(?:\n (?:(\\busing)\\s+)?\n (?:(\\bref)\\s+(?:(\\breadonly)\\s+)?)?(\\bauto|let\\b)|\n (?\n (?:\n (?:ref\\s+(?:readonly\\s+)?)?\n (?:\n (?:(?@?[_[:alpha:]][_[:alnum:]]*)\\s*\\:\\:\\s*)? \n )\n )\n )\n)\\s+\n(\\g)\\s*\n(?!=>)\n(?=,|;|=|\\))", + "beginCaptures": { + "1": { + "name": "keyword.other.using.vein" + }, + "2": { + "name": "storage.modifier.vein" + }, + "3": { + "name": "storage.modifier.vein" + }, + "4": { + "name": "keyword.other.var.vein" + }, + "5": { + "patterns": [ + { + "include": "#type" + } + ] + }, + "7": { + "name": "variable.other.constant.local.vein" + } + }, + "end": "(?=;|\\))", + "patterns": [ + { + "include": "#global_keywords" + }, + { + "name": "variable.other.constant.local.vein", + "match": "@?[_[:alpha:]][_[:alnum:]]*" + }, + { + "include": "#punctuation-comma" + }, + { + "include": "#comment" + }, + { + "include": "#variable-initializer" + } + ] + }, + "variable-initializer": { + "begin": "(?)", + "beginCaptures": { + "1": { + "name": "keyword.operator.assignment.vein" + } + }, + "end": "(?=[,\\)\\];}])", + "patterns": [ + { + "include": "#ref-modifier" + }, + { + "include": "#expression" + } + ] + }, + "property-accessors": { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.vein" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.vein" + } + }, + "patterns": [ + { + "name": "storage.modifier.vein", + "match": "\\b(private|protected|internal)\\b" + }, + { + "name": "keyword.other.get.vein", + "match": "\\b(get)\\b" + }, + { + "name": "keyword.other.set.vein", + "match": "\\b(set)\\b" + }, + { + "include": "#comment" + }, + { + "include": "#attribute-section" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + }, + { + "include": "#punctuation-semicolon" + } + ] + }, + "attribute-section": { + "begin": "(\\[)(assembly|module|field|event|method|param|property|return|type)?(\\:)?", + "beginCaptures": { + "1": { + "name": "punctuation.squarebracket.open.vein" + }, + "2": { + "name": "keyword.other.attribute-specifier.vein" + }, + "3": { + "name": "punctuation.separator.colon.vein" + } + }, + "end": "(\\])", + "endCaptures": { + "1": { + "name": "punctuation.squarebracket.close.vein" + } + }, + "patterns": [ + { + "include": "#comment" + }, + { + "include": "#attribute" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "attribute": { + "patterns": [ + { + "include": "#type-name" + }, + { + "include": "#attribute-arguments" + } + ] + }, + "attribute-arguments": { + "begin": "(\\()", + "beginCaptures": { + "1": { + "name": "punctuation.parenthesis.open.vein" + } + }, + "end": "(\\))", + "endCaptures": { + "1": { + "name": "punctuation.parenthesis.close.vein" + } + }, + "patterns": [ + { + "include": "#attribute-named-argument" + }, + { + "include": "#expression" + }, + { + "include": "#punctuation-comma" + } + ] + }, + "gc-modifier": { + "name": "entity.operation.gc.vein", + "match": "(?x)(gc)\\s+(((nocontrol|auto)\\;))", + "beginCaptures": { + "1": { + "name": "keyword.control.gc.vein" + }, + "4": { + "name": "keyword.control.gc.vein" + } + } + }, + "sync-modifier": { + "name": "entity.operation.sync.vein", + "match": "(?x)(sync)\\s+(((nocontrol|auto|inheritable)\\;)|\\{)", + "beginCaptures": { + "1": { + "name": "keyword.control.sync.vein" + }, + "4": { + "name": "keyword.control.sync.vein" + } + } + }, + "body-operation-statament": { + "begin": "\\b(body)\\s+", + "beginCaptures": { + "1": { + "name": "keyword.control.body.vein" + } + }, + "end": "(?<=\\})", + "patterns": [ + { + "begin": "\\{", + "beginCaptures": { + "0": { + "name": "punctuation.curlybrace.open.vein" + } + }, + "end": "\\}", + "endCaptures": { + "0": { + "name": "punctuation.curlybrace.close.vein" + } + }, + "patterns": [ + { + "include": "#literal" + }, + { + "include": "#interpolated-string" + }, + { + "include": "#comment" + }, + { + "include": "#punctuation-accessor" + }, + { + "include": "#parenthesized-parameter-list" + }, + { + "include": "#generic-constraints" + }, + { + "include": "#expression-body" + }, + { + "include": "#block" + }, + { + "include": "#type" + } + ] + } + ] + }, + "object-creation-with-parameters": { + "begin": "(new)\\s+([_[:alpha:]][_[:alnum:]]*)(?=\\()", + "beginCaptures": { + "1": { + "name": "keyword.other.new.vein" + }, + "2": { + "name": "entity.name.type", + "patterns": [ + { + "include": "#type" + } + ] + } + }, + "end": "(?<=\\))", + "patterns": [ + { + "include": "#argument-list" + } + ] + } + } +} \ No newline at end of file