@sap/cds-lsp
Advanced tools
Comparing version 7.2.0 to 7.3.0
@@ -9,2 +9,19 @@ # Changelog | ||
## 7.3.0 - 2023-10-09 | ||
### Added | ||
- support for `cdsc.moduleLookupDirectories` | ||
### Changed | ||
- formatting of action and function parameters according to existing newlines | ||
### Fixed | ||
- highlighting of identifiers, annotations, actions, functions, comments, and more | ||
- highlighting of queries in entity definitions | ||
- highlighting of keywords and literals in `type` statements | ||
- formatting of escaped names and `order by` clauses | ||
### Also see | ||
- `@sap/cds-compiler` 4.3.0 | ||
## 7.2.0 - 2023-09-03 | ||
@@ -11,0 +28,0 @@ |
@@ -153,3 +153,3 @@ import * as LSP from 'vscode-languageserver-protocol'; | ||
nameLocation(thing: any): XsnLocation | undefined; | ||
absoluteNameOf(thing: any): string | undefined; | ||
absoluteNameOf(thing: Thing | XsnName | undefined): string | "?"; | ||
getArtifactName(thing: any): any; | ||
@@ -173,2 +173,3 @@ locationOf(thing: any): XsnLocation; | ||
isReturnsCarrier(thing: any): boolean; | ||
getImplicitNamespaceNameLocation(thing: any): any; | ||
} | ||
@@ -175,0 +176,0 @@ export interface XsnCompileModel { |
@@ -130,3 +130,3 @@ import { BigIntStats, Dirent, PathLike, StatOptions, Stats, WriteFileOptions } from 'fs'; | ||
nameLocation(thing: any): XsnLocation | undefined; | ||
absoluteNameOf(thing: any): string | undefined; | ||
absoluteNameOf(thing: Thing | XsnName | undefined): string | "?"; | ||
getArtifactName(thing: any): any; | ||
@@ -150,2 +150,3 @@ locationOf(thing: any): XsnLocation; | ||
isReturnsCarrier(thing: any): boolean; | ||
getImplicitNamespaceNameLocation(thing: any): any; | ||
} | ||
@@ -580,2 +581,3 @@ export interface XsnCompileModel { | ||
"orderBySpec", | ||
"parameterDef", | ||
"parameterListDef", | ||
@@ -670,4 +672,4 @@ "projectionExclusion", | ||
readonly data: Record<string, unknown>; | ||
getFirstToken(predicate?: (token: IRuleToken) => boolean): IRuleToken | undefined; | ||
getLastToken(predicate?: (token: IRuleToken) => boolean): IRuleToken | undefined; | ||
getFirstToken(predicate?: (child: IRuleToken) => boolean, subtreePredicate?: (child: IRuleNode) => boolean): IRuleToken | null; | ||
getLastToken(predicate?: (child: IRuleToken) => boolean, subtreePredicate?: (child: IRuleNode) => boolean): IRuleToken | null; | ||
toString(): string; | ||
@@ -887,2 +889,3 @@ } | ||
}; | ||
lookupDirectories: string[]; | ||
} | ||
@@ -1055,4 +1058,4 @@ export interface I18n { | ||
name: string; | ||
workspaceUri: string; | ||
workspaceRoot: string; | ||
workspaceUri: Uri; | ||
workspaceRoot: AbsolutePath; | ||
translationBroker: _ITranslationBroker; | ||
@@ -1059,0 +1062,0 @@ documentationProvider: _IDocumentationProvider; |
{ | ||
"name": "@sap/cds-lsp", | ||
"version": "7.2.0", | ||
"lockfileVersion": 2, | ||
"version": "7.3.0", | ||
"lockfileVersion": 3, | ||
"requires": true, | ||
@@ -9,5 +9,5 @@ "packages": { | ||
"name": "@sap/cds-lsp", | ||
"version": "7.2.0", | ||
"version": "7.3.0", | ||
"dependencies": { | ||
"@sap/cds-compiler": "4.2.2", | ||
"@sap/cds-compiler": "4.3.0", | ||
"ignore": "5.2.4", | ||
@@ -18,9 +18,9 @@ "json-source-map": "0.6.1", | ||
"tiny-typed-emitter": "2.1.0", | ||
"vscode-languageserver": "8.1.0", | ||
"vscode-languageserver-protocol": "3.17.3", | ||
"vscode-languageserver-textdocument": "1.0.8" | ||
"vscode-languageserver": "9.0.1", | ||
"vscode-languageserver-protocol": "3.17.5", | ||
"vscode-languageserver-textdocument": "1.0.11" | ||
} | ||
}, | ||
"node_modules/@sap/cds-compiler": { | ||
"version": "4.2.2", | ||
"version": "4.3.0", | ||
"dependencies": { | ||
@@ -39,3 +39,3 @@ "antlr4": "4.9.3" | ||
"node_modules/@types/mdast": { | ||
"version": "3.0.12", | ||
"version": "3.0.13", | ||
"dependencies": { | ||
@@ -349,3 +349,3 @@ "@types/unist": "^2" | ||
"node_modules/vscode-jsonrpc": { | ||
"version": "8.1.0", | ||
"version": "8.2.0", | ||
"engines": { | ||
@@ -356,5 +356,5 @@ "node": ">=14.0.0" | ||
"node_modules/vscode-languageserver": { | ||
"version": "8.1.0", | ||
"version": "9.0.1", | ||
"dependencies": { | ||
"vscode-languageserver-protocol": "3.17.3" | ||
"vscode-languageserver-protocol": "3.17.5" | ||
}, | ||
@@ -366,13 +366,13 @@ "bin": { | ||
"node_modules/vscode-languageserver-protocol": { | ||
"version": "3.17.3", | ||
"version": "3.17.5", | ||
"dependencies": { | ||
"vscode-jsonrpc": "8.1.0", | ||
"vscode-languageserver-types": "3.17.3" | ||
"vscode-jsonrpc": "8.2.0", | ||
"vscode-languageserver-types": "3.17.5" | ||
} | ||
}, | ||
"node_modules/vscode-languageserver-textdocument": { | ||
"version": "1.0.8" | ||
"version": "1.0.11" | ||
}, | ||
"node_modules/vscode-languageserver-types": { | ||
"version": "3.17.3" | ||
"version": "3.17.5" | ||
}, | ||
@@ -382,319 +382,3 @@ "node_modules/zwitch": { | ||
} | ||
}, | ||
"dependencies": { | ||
"@sap/cds-compiler": { | ||
"version": "4.2.2", | ||
"requires": { | ||
"antlr4": "4.9.3" | ||
} | ||
}, | ||
"@types/mdast": { | ||
"version": "3.0.12", | ||
"requires": { | ||
"@types/unist": "^2" | ||
} | ||
}, | ||
"@types/unist": { | ||
"version": "2.0.8" | ||
}, | ||
"antlr4": { | ||
"version": "4.9.3" | ||
}, | ||
"bail": { | ||
"version": "1.0.5" | ||
}, | ||
"ccount": { | ||
"version": "1.1.0" | ||
}, | ||
"character-entities": { | ||
"version": "1.2.4" | ||
}, | ||
"character-entities-legacy": { | ||
"version": "1.1.4" | ||
}, | ||
"character-reference-invalid": { | ||
"version": "1.1.4" | ||
}, | ||
"debug": { | ||
"version": "4.3.4", | ||
"requires": { | ||
"ms": "2.1.2" | ||
} | ||
}, | ||
"escape-string-regexp": { | ||
"version": "4.0.0" | ||
}, | ||
"extend": { | ||
"version": "3.0.2" | ||
}, | ||
"ignore": { | ||
"version": "5.2.4" | ||
}, | ||
"is-alphabetical": { | ||
"version": "1.0.4" | ||
}, | ||
"is-alphanumerical": { | ||
"version": "1.0.4", | ||
"requires": { | ||
"is-alphabetical": "^1.0.0", | ||
"is-decimal": "^1.0.0" | ||
} | ||
}, | ||
"is-buffer": { | ||
"version": "2.0.5" | ||
}, | ||
"is-decimal": { | ||
"version": "1.0.4" | ||
}, | ||
"is-hexadecimal": { | ||
"version": "1.0.4" | ||
}, | ||
"is-plain-obj": { | ||
"version": "2.1.0" | ||
}, | ||
"json-source-map": { | ||
"version": "0.6.1" | ||
}, | ||
"longest-streak": { | ||
"version": "2.0.4" | ||
}, | ||
"markdown-table": { | ||
"version": "2.0.0", | ||
"requires": { | ||
"repeat-string": "^1.0.0" | ||
} | ||
}, | ||
"mdast-util-find-and-replace": { | ||
"version": "1.1.1", | ||
"requires": { | ||
"escape-string-regexp": "^4.0.0", | ||
"unist-util-is": "^4.0.0", | ||
"unist-util-visit-parents": "^3.0.0" | ||
} | ||
}, | ||
"mdast-util-from-markdown": { | ||
"version": "0.8.5", | ||
"requires": { | ||
"@types/mdast": "^3.0.0", | ||
"mdast-util-to-string": "^2.0.0", | ||
"micromark": "~2.11.0", | ||
"parse-entities": "^2.0.0", | ||
"unist-util-stringify-position": "^2.0.0" | ||
} | ||
}, | ||
"mdast-util-gfm": { | ||
"version": "0.1.2", | ||
"requires": { | ||
"mdast-util-gfm-autolink-literal": "^0.1.0", | ||
"mdast-util-gfm-strikethrough": "^0.2.0", | ||
"mdast-util-gfm-table": "^0.1.0", | ||
"mdast-util-gfm-task-list-item": "^0.1.0", | ||
"mdast-util-to-markdown": "^0.6.1" | ||
} | ||
}, | ||
"mdast-util-gfm-autolink-literal": { | ||
"version": "0.1.3", | ||
"requires": { | ||
"ccount": "^1.0.0", | ||
"mdast-util-find-and-replace": "^1.1.0", | ||
"micromark": "^2.11.3" | ||
} | ||
}, | ||
"mdast-util-gfm-strikethrough": { | ||
"version": "0.2.3", | ||
"requires": { | ||
"mdast-util-to-markdown": "^0.6.0" | ||
} | ||
}, | ||
"mdast-util-gfm-table": { | ||
"version": "0.1.6", | ||
"requires": { | ||
"markdown-table": "^2.0.0", | ||
"mdast-util-to-markdown": "~0.6.0" | ||
} | ||
}, | ||
"mdast-util-gfm-task-list-item": { | ||
"version": "0.1.6", | ||
"requires": { | ||
"mdast-util-to-markdown": "~0.6.0" | ||
} | ||
}, | ||
"mdast-util-to-markdown": { | ||
"version": "0.6.5", | ||
"requires": { | ||
"@types/unist": "^2.0.0", | ||
"longest-streak": "^2.0.0", | ||
"mdast-util-to-string": "^2.0.0", | ||
"parse-entities": "^2.0.0", | ||
"repeat-string": "^1.0.0", | ||
"zwitch": "^1.0.0" | ||
} | ||
}, | ||
"mdast-util-to-string": { | ||
"version": "2.0.0" | ||
}, | ||
"micromark": { | ||
"version": "2.11.4", | ||
"requires": { | ||
"debug": "^4.0.0", | ||
"parse-entities": "^2.0.0" | ||
} | ||
}, | ||
"micromark-extension-gfm": { | ||
"version": "0.3.3", | ||
"requires": { | ||
"micromark": "~2.11.0", | ||
"micromark-extension-gfm-autolink-literal": "~0.5.0", | ||
"micromark-extension-gfm-strikethrough": "~0.6.5", | ||
"micromark-extension-gfm-table": "~0.4.0", | ||
"micromark-extension-gfm-tagfilter": "~0.3.0", | ||
"micromark-extension-gfm-task-list-item": "~0.3.0" | ||
} | ||
}, | ||
"micromark-extension-gfm-autolink-literal": { | ||
"version": "0.5.7", | ||
"requires": { | ||
"micromark": "~2.11.3" | ||
} | ||
}, | ||
"micromark-extension-gfm-strikethrough": { | ||
"version": "0.6.5", | ||
"requires": { | ||
"micromark": "~2.11.0" | ||
} | ||
}, | ||
"micromark-extension-gfm-table": { | ||
"version": "0.4.3", | ||
"requires": { | ||
"micromark": "~2.11.0" | ||
} | ||
}, | ||
"micromark-extension-gfm-tagfilter": { | ||
"version": "0.3.0" | ||
}, | ||
"micromark-extension-gfm-task-list-item": { | ||
"version": "0.3.3", | ||
"requires": { | ||
"micromark": "~2.11.0" | ||
} | ||
}, | ||
"ms": { | ||
"version": "2.1.2" | ||
}, | ||
"parse-entities": { | ||
"version": "2.0.0", | ||
"requires": { | ||
"character-entities": "^1.0.0", | ||
"character-entities-legacy": "^1.0.0", | ||
"character-reference-invalid": "^1.0.0", | ||
"is-alphanumerical": "^1.0.0", | ||
"is-decimal": "^1.0.0", | ||
"is-hexadecimal": "^1.0.0" | ||
} | ||
}, | ||
"remark": { | ||
"version": "13.0.0", | ||
"requires": { | ||
"remark-parse": "^9.0.0", | ||
"remark-stringify": "^9.0.0", | ||
"unified": "^9.1.0" | ||
} | ||
}, | ||
"remark-gfm": { | ||
"version": "1.0.0", | ||
"requires": { | ||
"mdast-util-gfm": "^0.1.0", | ||
"micromark-extension-gfm": "^0.3.0" | ||
} | ||
}, | ||
"remark-parse": { | ||
"version": "9.0.0", | ||
"requires": { | ||
"mdast-util-from-markdown": "^0.8.0" | ||
} | ||
}, | ||
"remark-stringify": { | ||
"version": "9.0.1", | ||
"requires": { | ||
"mdast-util-to-markdown": "^0.6.0" | ||
} | ||
}, | ||
"repeat-string": { | ||
"version": "1.6.1" | ||
}, | ||
"tiny-typed-emitter": { | ||
"version": "2.1.0" | ||
}, | ||
"trough": { | ||
"version": "1.0.5" | ||
}, | ||
"unified": { | ||
"version": "9.2.2", | ||
"requires": { | ||
"bail": "^1.0.0", | ||
"extend": "^3.0.0", | ||
"is-buffer": "^2.0.0", | ||
"is-plain-obj": "^2.0.0", | ||
"trough": "^1.0.0", | ||
"vfile": "^4.0.0" | ||
} | ||
}, | ||
"unist-util-is": { | ||
"version": "4.1.0" | ||
}, | ||
"unist-util-stringify-position": { | ||
"version": "2.0.3", | ||
"requires": { | ||
"@types/unist": "^2.0.2" | ||
} | ||
}, | ||
"unist-util-visit-parents": { | ||
"version": "3.1.1", | ||
"requires": { | ||
"@types/unist": "^2.0.0", | ||
"unist-util-is": "^4.0.0" | ||
} | ||
}, | ||
"vfile": { | ||
"version": "4.2.1", | ||
"requires": { | ||
"@types/unist": "^2.0.0", | ||
"is-buffer": "^2.0.0", | ||
"unist-util-stringify-position": "^2.0.0", | ||
"vfile-message": "^2.0.0" | ||
} | ||
}, | ||
"vfile-message": { | ||
"version": "2.0.4", | ||
"requires": { | ||
"@types/unist": "^2.0.0", | ||
"unist-util-stringify-position": "^2.0.0" | ||
} | ||
}, | ||
"vscode-jsonrpc": { | ||
"version": "8.1.0" | ||
}, | ||
"vscode-languageserver": { | ||
"version": "8.1.0", | ||
"requires": { | ||
"vscode-languageserver-protocol": "3.17.3" | ||
} | ||
}, | ||
"vscode-languageserver-protocol": { | ||
"version": "3.17.3", | ||
"requires": { | ||
"vscode-jsonrpc": "8.1.0", | ||
"vscode-languageserver-types": "3.17.3" | ||
} | ||
}, | ||
"vscode-languageserver-textdocument": { | ||
"version": "1.0.8" | ||
}, | ||
"vscode-languageserver-types": { | ||
"version": "3.17.3" | ||
}, | ||
"zwitch": { | ||
"version": "1.0.5" | ||
} | ||
} | ||
} |
{ | ||
"name": "@sap/cds-lsp", | ||
"description": "Language server for CDS", | ||
"version": "7.2.0", | ||
"version": "7.3.0", | ||
"homepage": "https://cap.cloud.sap/", | ||
@@ -39,3 +39,3 @@ "author": "SAP SE (https://www.sap.com)", | ||
"dependencies": { | ||
"@sap/cds-compiler": "4.2.2", | ||
"@sap/cds-compiler": "4.3.0", | ||
"ignore": "5.2.4", | ||
@@ -46,6 +46,6 @@ "json-source-map": "0.6.1", | ||
"tiny-typed-emitter": "2.1.0", | ||
"vscode-languageserver": "8.1.0", | ||
"vscode-languageserver-protocol": "3.17.3", | ||
"vscode-languageserver-textdocument": "1.0.8" | ||
"vscode-languageserver": "9.0.1", | ||
"vscode-languageserver-protocol": "3.17.5", | ||
"vscode-languageserver-textdocument": "1.0.11" | ||
} | ||
} |
@@ -11,4 +11,4 @@ { | ||
{ | ||
"comment": "entityDef, aspectDef", | ||
"begin": "\\b(aspect|(abstract\\s+)?entity)\\b", | ||
"comment": "entityDef, aspectDef, and others containing elements", | ||
"begin": "\\b(aspect|(abstract\\s+)?entity|type|event)\\b", | ||
"beginCaptures": { | ||
@@ -30,5 +30,11 @@ "1": { | ||
{ | ||
"include": "#atAnnoParen" | ||
}, | ||
{ | ||
"include": "#atAnnoNoParen" | ||
}, | ||
{ | ||
"comment": "Aspects", | ||
"begin": ":", | ||
"end": "(?={|;)", | ||
"end": "(?=[{;@])", | ||
"beginCaptures": { | ||
@@ -41,2 +47,14 @@ "0": { | ||
{ | ||
"include": "#keywords" | ||
}, | ||
{ | ||
"include": "#numbers" | ||
}, | ||
{ | ||
"include": "#strings" | ||
}, | ||
{ | ||
"include": "#comments" | ||
}, | ||
{ | ||
"include": "#identifiers" | ||
@@ -62,4 +80,4 @@ }, | ||
{ | ||
"comment": "extendVarious (TODO simplify begin pattern - would currently produce false positives)", | ||
"begin": "(?i)\\b(extend)\\s+((context|service|aspect|entity|projection|type)\\s+)?(\\S+)(\\s+(with)(\\s+(actions|definitions|columns|elements|enum))?|(?=\\s*{))", | ||
"comment": "extendVarious (TODO simplify begin pattern - would currently produce false positives; allow annotationAssignment_ll1)", | ||
"begin": "(?i)\\b(extend)\\s+((context|service|aspect|entity|projection|type)\\s+)?((?!@)\\S+)(\\s+(with)(\\s+(actions|definitions|columns|elements|enum))?|(?=\\s*{))", | ||
"beginCaptures": { | ||
@@ -73,3 +91,3 @@ "1": { | ||
"4": { | ||
"name": "identifier.cds" | ||
"name": "entity.name.type.cds" | ||
}, | ||
@@ -97,2 +115,8 @@ "6": { | ||
{ | ||
"include": "#atAnnoParen" | ||
}, | ||
{ | ||
"include": "#atAnnoNoParen" | ||
}, | ||
{ | ||
"include": "#keywords" | ||
@@ -110,3 +134,3 @@ }, | ||
{ | ||
"match": "(?<!\\.)\\b(annotate)\\b\\s*[\\w.]+\\b\\s*\\b(with)?\\b", | ||
"match": "(?<!\\.)\\b(annotate)\\b\\s*([\\w.]+)\\b\\s*\\b(with)?\\b", | ||
"captures": { | ||
@@ -117,2 +141,5 @@ "1": { | ||
"2": { | ||
"name": "entity.name.type.cds" | ||
}, | ||
"3": { | ||
"name": "keyword.strong.control.import.cds" | ||
@@ -123,3 +150,3 @@ } | ||
{ | ||
"begin": "(?<!\\.)\\b(import|using)(?!\\s*:)\\b", | ||
"begin": "(?<!\\.)\\b(using)(?!\\s*:)\\b", | ||
"beginCaptures": { | ||
@@ -136,3 +163,2 @@ "1": { | ||
}, | ||
"name": "meta.import.cds", | ||
"patterns": [ | ||
@@ -160,3 +186,3 @@ { | ||
"2": { | ||
"name": "variable.other.module.cds" | ||
"name": "entity.name.type.cds" | ||
}, | ||
@@ -167,10 +193,7 @@ "3": { | ||
"4": { | ||
"name": "invalid.illegal.cds" | ||
}, | ||
"5": { | ||
"name": "variable.other.module-alias.cds" | ||
"name": "entity.name.type.cds" | ||
} | ||
}, | ||
"comment": "(default|name) as alias", | ||
"match":"(?:\\b(default)\\b|\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b)\\s*(\\bas\\b)\\s*(?:(\\bdefault\\b|\\*)|\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b)" | ||
"match": "(?:\\b(default)\\b|\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b)\\s*(\\bas\\b)\\s*(?:\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b)" | ||
}, | ||
@@ -186,3 +209,3 @@ { | ||
"match": "\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b", | ||
"name": "variable.other.module.cds" | ||
"name": "entity.name.type.cds" | ||
} | ||
@@ -194,6 +217,6 @@ ] | ||
"1": { | ||
"name": "variable.language.import-all.cds" | ||
"name": "keyword.operator.asterisk" | ||
}, | ||
"2": { | ||
"name": "variable.other.module.cds" | ||
"name": "entity.name.type.cds" | ||
}, | ||
@@ -204,11 +227,11 @@ "3": { | ||
"4": { | ||
"name": "variable.other.module-alias.cds" | ||
"name": "entity.name.type.cds" | ||
} | ||
}, | ||
"comment": "(default|*|name) as alias", | ||
"match":"(?:(\\*)|(?=\\D)(\\b[\\$\\.\\w]+\\b))\\s*(\\bas\\b)\\s*(?=\\D)(\\b[\\$\\.\\w]+\\b)" | ||
"match": "(?:(\\*)|(?=\\D)(\\b[\\$\\.\\w]+\\b))\\s*(\\bas\\b)\\s*(?=\\D)(\\b[\\$\\.\\w]+\\b)" | ||
}, | ||
{ | ||
"match": "\\*", | ||
"name": "variable.language.import-all.cds" | ||
"name": "keyword.operator.asterisk" | ||
}, | ||
@@ -231,3 +254,3 @@ { | ||
"match": "\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b(?=.*\\bfrom\\b)", | ||
"name": "variable.other.module.cds" | ||
"name": "entity.name.type.cds" | ||
}, | ||
@@ -253,154 +276,11 @@ { | ||
"comment": "ES6 export: `export default (variable|class, etc.)`", | ||
"match":"\\b(export)\\b\\s*\\b(default)\\b(?:\\s*)\\b((?!\\bclass\\b|\\blet\\b|\\bvar\\b|\\bconst\\b)[$_a-zA-Z][$_a-zA-Z0-9]*)?\\b", | ||
"match": "(?i)\\b(export)\\b\\s*\\b(default)\\b(?:\\s*)\\b((?!\\bclass\\b|\\blet\\b|\\bvar\\b|\\bconst\\b)[$_a-zA-Z][$_a-zA-Z0-9]*)?\\b", | ||
"name": "meta.export.cds" | ||
}, | ||
{ | ||
"begin": "(?<!\\.)\\b(export)(?!\\s*:)\\b", | ||
"begin": "(?i)\\b(action|function)\\s+([$_a-zA-Z][$_a-zA-Z0-9]*)\\s*(\\()", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "keyword.control.export.cds" | ||
} | ||
}, | ||
"comment": "ES6 export, re-export: `export {member as alias, [...]} [from ...]`", | ||
"end": "(?=;|\\bclass\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|$)", | ||
"name": "meta.export.cds", | ||
"patterns": [ | ||
{ | ||
"include": "#numbers" | ||
"name": "keyword.strong.cds" | ||
}, | ||
{ | ||
"begin": "{(?=.*\\bfrom\\b)", | ||
"beginCaptures": { | ||
"0": { | ||
"name": "punctuation.definition.modules.begin.cds" | ||
} | ||
}, | ||
"comment": "`{ member1 , member2 as alias2 , [...] }` inside re-export", | ||
"end": "}", | ||
"endCaptures": { | ||
"0": { | ||
"name": "punctuation.definition.modules.end.cds" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"captures": { | ||
"1": { | ||
"name": "variable.language.default.cds" | ||
}, | ||
"2": { | ||
"name": "variable.other.module.cds" | ||
}, | ||
"3": { | ||
"name": "keyword.control.cds" | ||
}, | ||
"4": { | ||
"name": "variable.language.default.cds" | ||
}, | ||
"5": { | ||
"name": "invalid.illegal.cds" | ||
}, | ||
"6": { | ||
"name": "variable.other.module-alias.cds" | ||
} | ||
}, | ||
"comment": "(default|name) as alias", | ||
"match":"(?:\\b(default)\\b|\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b)\\s*(\\bas\\b)\\s*(?:\\b(default)\\b|(\\*)|\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b)" | ||
}, | ||
{ | ||
"match": ",", | ||
"name": "meta.delimiter.object.comma.cds" | ||
}, | ||
{ | ||
"match": "\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b", | ||
"name": "variable.other.module.cds" | ||
} | ||
] | ||
}, | ||
{ | ||
"begin": "(?![\\p{L}$_]){", | ||
"beginCaptures": { | ||
"0": { | ||
"name": "punctuation.definition.modules.begin.cds" | ||
} | ||
}, | ||
"comment": "{ member1 , member2 as alias2 , [...] }", | ||
"end": "}", | ||
"endCaptures": { | ||
"0": { | ||
"name": "punctuation.definition.modules.end.cds" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"captures": { | ||
"1": { | ||
"name": "invalid.illegal.cds" | ||
}, | ||
"2": { | ||
"name": "variable.other.module.cds" | ||
}, | ||
"3": { | ||
"name": "keyword.control.cds" | ||
}, | ||
"4": { | ||
"name": "variable.language.default.cds" | ||
}, | ||
"5": { | ||
"name": "invalid.illegal.cds" | ||
}, | ||
"6": { | ||
"name": "variable.other.module-alias.cds" | ||
} | ||
}, | ||
"comment": "name as (default|alias)", | ||
"match":"(?:\\b(default)\\b|\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b)\\s*(\\bas\\b)\\s*(?:\\b(default)\\b|(\\*)|\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b)" | ||
}, | ||
{ | ||
"match": ",", | ||
"name": "meta.delimiter.object.comma.cds" | ||
}, | ||
{ | ||
"match": "\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b", | ||
"name": "variable.other.module.cds" | ||
} | ||
] | ||
}, | ||
{ | ||
"match": "\\*(?=.*\\bfrom\\b)", | ||
"name": "variable.language.import-all.cds" | ||
}, | ||
{ | ||
"match": "\\b(default)\\b", | ||
"name": "variable.language.default.cds" | ||
}, | ||
{ | ||
"include": "#strings" | ||
}, | ||
{ | ||
"include": "#comments" | ||
}, | ||
{ | ||
"match": "(?i)\\b(from)\\b", | ||
"name": "keyword.control.cds" | ||
}, | ||
{ | ||
"match": "\\b([$_a-zA-Z][$_a-zA-Z0-9]*)\\b", | ||
"name": "variable.other.module.cds" | ||
}, | ||
{ | ||
"match": ",", | ||
"name": "meta.delimiter.object.comma.cds" | ||
}, | ||
{ | ||
"include": "#operators" | ||
} | ||
] | ||
}, | ||
{ | ||
"begin":"\\b(?:(static)\\s+)?(?!(?:break|case|catch|continue|do|else|finally|for|if|export|import|using|package|return|switch|throw|try|while|with)[\\s\\(])([$_a-zA-Z][$_a-zA-Z0-9]*)\\s*(\\()(?=(?:[^\\(\\)]*)?\\)\\s*{)", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "storage.modifier.static.cds" | ||
}, | ||
"2": { | ||
@@ -416,6 +296,5 @@ "name": "entity.name.function.cds" | ||
"0": { | ||
"name": "punctuation.definition.parameters.begin.cds" | ||
"name": "punctuation.definition.parameters.end.cds" | ||
} | ||
}, | ||
"name": "meta.method.cds", | ||
"patterns": [ | ||
@@ -442,3 +321,3 @@ { | ||
}, | ||
"match":"\\b(class)(?:\\s+([$_a-zA-Z][$_a-zA-Z0-9]*))?(?:\\s+(extends)\\s+([$_a-zA-Z][$_a-zA-Z0-9]*))?\\s*($|(?={))", | ||
"match": "\\b(class)(?:\\s+([$_a-zA-Z][$_a-zA-Z0-9]*))?(?:\\s+(extends)\\s+([$_a-zA-Z][$_a-zA-Z0-9]*))?\\s*($|(?={))", | ||
"name": "meta.class.cds" | ||
@@ -557,7 +436,8 @@ }, | ||
{ | ||
"comment": "Matches the function calls.", | ||
"match": "(?<!\\w)([$_a-zA-Z][$_a-zA-Z0-9]*)(?=\\()", | ||
"name": "meta.function-call.cds" | ||
"include": "#atAnnoParen" | ||
}, | ||
{ | ||
"include": "#atAnnoNoParen" | ||
}, | ||
{ | ||
"include": "#keywords" | ||
@@ -585,12 +465,19 @@ }, | ||
{ | ||
"comment": "Association, Composition", | ||
"match": "(?<!\\.|\\$)\\b(Association\\b\\s*(?:\\[[0-9.eE+, *-]*\\]\\s*)?to\\b\\s*(?:many\\s*|one\\s*)?|Composition\\b\\s*(?:\\[[0-9.eE+, *-]*\\]\\s*)?of\\b\\s*(?:many\\s*|one\\s*)?)(?:(?=\\s*{)|([$_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\]))", | ||
"captures": { | ||
"1": { | ||
"name": "support.class.cds" | ||
}, | ||
"2": { | ||
"name": "entity.name.type.cds" | ||
} | ||
} | ||
}, | ||
{ | ||
"comment": "Types (exact casing)", | ||
"match": "(?<!\\.|\\$)\\b(Association\\b\\s*(?:\\[[0-9.eE+, *-]*\\]\\s*)?to\\b\\s*(?:(many|one)\\s*)?|Composition\\b\\s*(?:\\[[0-9.eE+, *-]*\\]\\s*)?of\\b\\s*(?:(many|one)\\s*)?|(Binary|Boolean|DateTime|Date|DecimalFloat|Decimal|Double|Int(16|32|64)|Integer64|Integer|LargeBinary|LargeString|Number|String|Timestamp|Time|UInt8|UUID)\\b\\s*(\\([^()]*\\))?)(?!\\$|\\s*:)", | ||
"match": "(?<!\\.|\\$)\\b(Binary|Boolean|DateTime|Date|DecimalFloat|Decimal|Double|Int(16|32|64)|Integer64|Integer|LargeBinary|LargeString|Number|String|Timestamp|Time|UInt8|UUID)\\b\\s*(\\([^()]*\\))?(?!\\$|\\s*:)", | ||
"name": "support.class.cds" | ||
}, | ||
{ | ||
"comment": "Keywords used in an invalid context", | ||
"match": "(?<!\\.|\\$)\\b(class|static|extends)\\b(?!\\$|\\s*:)", | ||
"name": "invalid.illegal.cds" | ||
}, | ||
{ | ||
"comment": "CQL keywords (arbitrary casing)", | ||
@@ -620,4 +507,4 @@ "match": "(?i)(?<!\\.|\\$)\\b(all|and|any|asc|between|by|case|cast|cross|desc|distinct|element|elements|escape|except|excluding|exists|first|from|full|group|group by|having|in|inner|intersect|into|is|join|last|left|like|limit|many|minus|mixin|not null|not|null|nulls|offset|one|or|order by|outer|redirected to|select|some|top|type of|union|where|with)\\b(?!\\$|\\s*:)", | ||
{ | ||
"match": "[$_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(\"\"[^\"]*)*\"|!\\[[^\\]]*(\\]\\][^\\]]*)*\\]", | ||
"name": "identifier.cds" | ||
"match": "(?<!@)(?:\\$?\\b[_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\])", | ||
"name": "entity.name.type.cds" | ||
} | ||
@@ -629,6 +516,2 @@ ] | ||
{ | ||
"match": "@\\(?[\\w.]+\\b", | ||
"name": "entity.other.attribute-name" | ||
}, | ||
{ | ||
"begin": "/\\*\\*(?!/)", | ||
@@ -672,14 +555,14 @@ "beginCaptures": { | ||
{ | ||
"begin": "(?=[\\p{L}$_])", | ||
"comment": "Matches valid argument, function and variable names. To be thorough: https://github.com/mathiasbynens/mothereff.in/tree/master/js-variables", | ||
"end": "(?=[,)/])", | ||
"patterns": [ | ||
{ | ||
"match": "\\G[$_a-zA-Z][$_a-zA-Z0-9]*", | ||
"name": "variable.parameter.function.cds" | ||
} | ||
] | ||
"match": "\\$?\\b[_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\]", | ||
"name": "variable.parameter.function.cds" | ||
}, | ||
{ | ||
"match": ",", | ||
"name": "punctuation.separator.object.cds" | ||
}, | ||
{ | ||
"include": "#comments" | ||
}, | ||
{ | ||
"include": "#operators" | ||
} | ||
@@ -703,3 +586,3 @@ ] | ||
{ | ||
"match":"(?<!\\w|\\$)[+-]?[0-9]+('.'[0-9]+)?([eE][+-]?[0-9]+)?(?!\\w)", | ||
"match": "(?<!\\w|\\$)[+-]?[0-9]+('.'[0-9]+)?([eE][+-]?[0-9]+)?(?!\\w)", | ||
"name": "constant.numeric.cds" | ||
@@ -725,3 +608,7 @@ } | ||
"match": "\\:\\s*(localized)\\s+", | ||
"name": "keyword.cds" | ||
"captures": { | ||
"1": { | ||
"name": "keyword.cds" | ||
} | ||
} | ||
}, | ||
@@ -776,3 +663,3 @@ { | ||
}, | ||
"end": "`", | ||
"end": "`(?!`)", | ||
"endCaptures": { | ||
@@ -786,2 +673,6 @@ "0": { | ||
{ | ||
"match": "``", | ||
"name": "string.quoted.other.template.block.cds" | ||
}, | ||
{ | ||
"include": "#interpolation" | ||
@@ -800,42 +691,41 @@ }, | ||
}, | ||
"interpolation": { | ||
"begin": "\\${", | ||
"beginCaptures": { | ||
"0": { | ||
"name": "punctuation.section.embedded.begin.cds" | ||
} | ||
}, | ||
"contentName": "source.cds", | ||
"end": "(})", | ||
"endCaptures": { | ||
"0": { | ||
"name": "punctuation.section.embedded.end.cds" | ||
}, | ||
"1": { | ||
"name": "source.cds" | ||
} | ||
}, | ||
"name": "meta.embedded.line.cds", | ||
"selectItemDef": { | ||
"begin": "^\\s*(?=\\*|.+\\s+as\\s+)", | ||
"end": "(?=})|(,)", | ||
"patterns": [ | ||
{ | ||
"begin": "{", | ||
"beginCaptures": { | ||
"0": { | ||
"name": "meta.brace.curly.cds" | ||
} | ||
}, | ||
"end": "}", | ||
"endCaptures": { | ||
"0": { | ||
"name": "meta.brace.curly.cds" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"include": "$self" | ||
} | ||
] | ||
"include": "#bracedElementDef" | ||
}, | ||
{ | ||
"include": "$self" | ||
"include": "#strings" | ||
}, | ||
{ | ||
"include": "#comments" | ||
}, | ||
{ | ||
"include": "#atAnnoParen" | ||
}, | ||
{ | ||
"include": "#atAnnoNoParen" | ||
}, | ||
{ | ||
"include": "#keywords" | ||
}, | ||
{ | ||
"include": "#bracketedExpression" | ||
}, | ||
{ | ||
"comment": "Element name or type", | ||
"match": "(?<!@)(?:\\$?\\b[_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\])", | ||
"name": "entity.other.attribute-name.cds" | ||
}, | ||
{ | ||
"include": "#operators" | ||
}, | ||
{ | ||
"include": "#numbers" | ||
}, | ||
{ | ||
"match": ",", | ||
"name": "punctuation.separator.object.cds" | ||
} | ||
@@ -845,3 +735,3 @@ ] | ||
"elementDef": { | ||
"begin": "(?=\\()|\\b(virtual(?:\\s+))?(key(?:\\s+))?(masked(?:\\s+))?(element(?:\\s+))?", | ||
"begin": "(?!\\s*@)(?:(?=\\()|\\b(virtual(?:\\s+))?(key(?:\\s+))?(masked(?:\\s+))?(element(?:\\s+))?)", | ||
"beginCaptures": { | ||
@@ -878,53 +768,24 @@ "1": { | ||
{ | ||
"include": "#atAnnoParen" | ||
}, | ||
{ | ||
"include": "#atAnnoNoParen" | ||
}, | ||
{ | ||
"include": "#keywords" | ||
}, | ||
{ | ||
"comment": "Ternary expression", | ||
"begin": "\\(", | ||
"beginCaptures": { | ||
"0": { | ||
"name": "punctuation.section.scope.begin.cds" | ||
} | ||
}, | ||
"end": "\\)", | ||
"endCaptures": { | ||
"0": { | ||
"name": "punctuation.section.scope.end.cds" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"match": "[$_a-zA-Z][$_a-zA-Z0-9]*|\\\"[^\\\"]*(\\\"\\\"[^\\\"]*)*\\\"|!\\\\[[^\\\\]]*(\\\\]\\\\][^\\\\]]*)*\\\\]", | ||
"captures": { | ||
"0": { | ||
"name": "entity.name.type.attribute-name.cds" | ||
} | ||
} | ||
}, | ||
{ | ||
"include": "#operators" | ||
} | ||
] | ||
"include": "#bracketedExpression" | ||
}, | ||
{ | ||
"comment": "Element name or type", | ||
"begin": "([$_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(\"\"[^\"]*)*\"|!\\[[^\\]]*(\\]\\][^\\]]*)*\\])(?=\\s*[:{,])", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "entity.name.type.attribute-name.cds" | ||
} | ||
}, | ||
"end": "(,)|(?=\\s*[:{])", | ||
"endCaptures": { | ||
"1": { | ||
"name": "punctuation.separator.object.cds" | ||
} | ||
} | ||
"match": "(?<!@)(?:\\$?\\b[_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\])(?=\\s*[:{,@])", | ||
"name": "entity.other.attribute-name.cds" | ||
}, | ||
{ | ||
"comment": "Whole-line element name", | ||
"match": "^\\s*([$_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(\"\"[^\"]*)*\"|!\\[[^\\]]*(\\]\\][^\\]]*)*\\])\\s*$", | ||
"match": "^\\s*([$_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\])\\s*$", | ||
"captures": { | ||
"1": { | ||
"name": "entity.name.type.attribute-name.cds" | ||
"name": "entity.other.attribute-name.cds" | ||
} | ||
@@ -943,3 +804,7 @@ } | ||
{ | ||
"comment": "TODO we would need expressions here" | ||
"match": ",", | ||
"name": "punctuation.separator.object.cds" | ||
}, | ||
{ | ||
"comment": "TODO include expressions" | ||
} | ||
@@ -967,5 +832,14 @@ ] | ||
{ | ||
"include": "#atAnnoParen" | ||
}, | ||
{ | ||
"include": "#atAnnoNoParen" | ||
}, | ||
{ | ||
"include": "#extendElement" | ||
}, | ||
{ | ||
"include": "#selectItemDef" | ||
}, | ||
{ | ||
"include": "#elementDef" | ||
@@ -1006,4 +880,4 @@ } | ||
{ | ||
"match": "[$_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(\"\"[^\"]*)*\"|!\\[[^\\]]*(\\]\\][^\\]]*)*\\]", | ||
"name": "entity.name.type.attribute-name.cds" | ||
"match": "(?<!@)(?:\\$?\\b[_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\])", | ||
"name": "entity.other.attribute-name.cds" | ||
}, | ||
@@ -1016,2 +890,8 @@ { | ||
{ | ||
"include": "#atAnnoParen" | ||
}, | ||
{ | ||
"include": "#atAnnoNoParen" | ||
}, | ||
{ | ||
"begin": "{", | ||
@@ -1062,2 +942,444 @@ "beginCaptures": { | ||
] | ||
}, | ||
"atAnnoParen": { | ||
"begin": "(@)\\s*(\\()", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "entity.name.tag.at.cds" | ||
}, | ||
"2": { | ||
"name": "punctuation.section.scope.begin.cds" | ||
} | ||
}, | ||
"end": "\\)", | ||
"endCaptures": { | ||
"0": { | ||
"name": "punctuation.section.scope.end.cds" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"include": "#annotationName" | ||
}, | ||
{ | ||
"include": "#optColonAndStructure" | ||
}, | ||
{ | ||
"include": "#optColonAndArray" | ||
}, | ||
{ | ||
"include": "#colonAndNumber" | ||
}, | ||
{ | ||
"include": "#colonAndString" | ||
}, | ||
{ | ||
"include": "#colonAndTemplateString" | ||
}, | ||
{ | ||
"include": "#colonAndHashIdent" | ||
}, | ||
{ | ||
"include": "#colonAndConstant" | ||
}, | ||
{ | ||
"match": ",", | ||
"name": "punctuation.separator.object.cds" | ||
}, | ||
{ | ||
"include": "#comments" | ||
} | ||
] | ||
}, | ||
"atAnnoNoParen": { | ||
"begin": "(@)(?!\\s*\\()", | ||
"comment": "'end' uses lookahead, since end of annotation value itself cannot be safely determined currently", | ||
"end": "(?<=[}\\]'`])(?=\\s*($|[@;]))|(?<![@:])(?!\\s*:)(?=$|[\\s@,;(){}\\[\\]'`/\"!]|\\b[$_a-zA-Z])", | ||
"captures": { | ||
"1": { | ||
"name": "entity.name.tag.at.cds" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"include": "#annotationName" | ||
}, | ||
{ | ||
"include": "#optColonAndStructure" | ||
}, | ||
{ | ||
"include": "#optColonAndArray" | ||
}, | ||
{ | ||
"include": "#colonAndNumber" | ||
}, | ||
{ | ||
"include": "#colonAndString" | ||
}, | ||
{ | ||
"include": "#colonAndTemplateString" | ||
}, | ||
{ | ||
"include": "#colonAndHashIdent" | ||
}, | ||
{ | ||
"include": "#colonAndConstant" | ||
}, | ||
{ | ||
"include": "#comments" | ||
} | ||
] | ||
}, | ||
"atAnnoName": { | ||
"begin": "(@)", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "entity.name.tag.at.cds" | ||
} | ||
}, | ||
"end": "(?:(?<=[$\"\\]])(?=\\s*[@:;])|(?<=[_a-zA-Z0-9])\\b)(?![#.])", | ||
"comment": "!TODO alternative end: (?=\\s*(?:$|[@,;:)]))", | ||
"patterns": [ | ||
{ | ||
"include": "#annotationName" | ||
} | ||
] | ||
}, | ||
"annotationName": { | ||
"comment": "annotationPath ( '#' annotationPathVariant ) ?", | ||
"begin": "(?=[$_\"!a-zA-Z0-9])", | ||
"end": "(?:(?<=[$\"\\]])(?=\\s*[@:;])|(?<=[_a-zA-Z0-9])\\b)(?!\\s*[#.])", | ||
"patterns": [ | ||
{ | ||
"match": "[$_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\]", | ||
"name": "entity.name.tag.cds" | ||
}, | ||
{ | ||
"match": "\\s*(\\.)\\s*(@)?", | ||
"captures": { | ||
"1": { | ||
"name": "entity.name.tag.dot.cds" | ||
}, | ||
"2": { | ||
"name": "entity.name.tag.at.cds" | ||
} | ||
} | ||
}, | ||
{ | ||
"match": "\\s*(#)\\s*", | ||
"captures": { | ||
"1": { | ||
"name": "entity.name.tag.hash.cds" | ||
} | ||
} | ||
} | ||
] | ||
}, | ||
"optColonAndStructure": { | ||
"begin": "(:)?\\s*({)", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "keyword.operator.colon" | ||
}, | ||
"2": { | ||
"name": "punctuation.section.scope.begin.cds" | ||
} | ||
}, | ||
"end": "}", | ||
"endCaptures": { | ||
"0": { | ||
"name": "punctuation.section.scope.end.cds" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"include": "#atAnnoNoParen" | ||
}, | ||
{ | ||
"comment": "annotationPath ( '#' annotationPathVariant )?", | ||
"include": "#annotationName" | ||
}, | ||
{ | ||
"include": "#optColonAndStructure" | ||
}, | ||
{ | ||
"include": "#optColonAndArray" | ||
}, | ||
{ | ||
"include": "#colonAndNumber" | ||
}, | ||
{ | ||
"include": "#colonAndString" | ||
}, | ||
{ | ||
"include": "#colonAndTemplateString" | ||
}, | ||
{ | ||
"include": "#colonAndHashIdent" | ||
}, | ||
{ | ||
"include": "#colonAndConstant" | ||
}, | ||
{ | ||
"match": ",", | ||
"name": "punctuation.separator.object.cds" | ||
}, | ||
{ | ||
"include": "#comments" | ||
} | ||
] | ||
}, | ||
"optColonAndArray": { | ||
"begin": "(:)?\\s*(\\[)", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "keyword.operator.colon" | ||
}, | ||
"2": { | ||
"name": "punctuation.section.scope.begin.cds" | ||
} | ||
}, | ||
"end": "\\]", | ||
"endCaptures": { | ||
"0": { | ||
"name": "punctuation.section.scope.end.cds" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"include": "#atAnnoNoParen" | ||
}, | ||
{ | ||
"comment": "annotationPath ( '#' annotationPathVariant )?", | ||
"include": "#annotationName" | ||
}, | ||
{ | ||
"match": "\\.{3}", | ||
"captures": { | ||
"0": { | ||
"name": "keyword.operator.ellipsis" | ||
} | ||
} | ||
}, | ||
{ | ||
"match": "(?i)(up)\\s+(to)\\b", | ||
"captures": { | ||
"1": { | ||
"name": "keyword.cds" | ||
}, | ||
"2": { | ||
"name": "keyword.cds" | ||
} | ||
} | ||
}, | ||
{ | ||
"include": "#optColonAndStructure" | ||
}, | ||
{ | ||
"include": "#optColonAndArray" | ||
}, | ||
{ | ||
"include": "#literalValue" | ||
}, | ||
{ | ||
"match": ",", | ||
"name": "punctuation.separator.object.cds" | ||
}, | ||
{ | ||
"include": "#comments" | ||
} | ||
] | ||
}, | ||
"colonAndNumber": { | ||
"begin": "(:)\\s*(?=[0-9+-])", | ||
"end": "(?<=[\\h0-9])\\b", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "keyword.operator.colon" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"include": "#numbers" | ||
}, | ||
{ | ||
"include": "#comments" | ||
} | ||
] | ||
}, | ||
"colonAndString": { | ||
"begin": "(:)\\s*(x|date|time(?:stamp)?)?\\s*(')", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "keyword.operator.colon" | ||
}, | ||
"2": { | ||
"name": "support.class.cds" | ||
}, | ||
"3": { | ||
"name": "string.quoted.single.cds punctuation.definition.string.begin.cds" | ||
} | ||
}, | ||
"end": "'(?!')", | ||
"endCaptures": { | ||
"0": { | ||
"name": "string.quoted.single.cds punctuation.definition.string.end.cds" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"match": "''", | ||
"name": "string.quoted.single.cds meta.single-quote.doubled.cds" | ||
}, | ||
{ | ||
"match": ".", | ||
"name": "string.quoted.single.cds" | ||
}, | ||
{ | ||
"include": "#comments" | ||
} | ||
] | ||
}, | ||
"colonAndTemplateString": { | ||
"begin": "(:)\\s*(?=`)", | ||
"end": "(?<=`)", | ||
"beginCaptures": { | ||
"1": { | ||
"name": "keyword.operator.colon" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"include": "#strings" | ||
}, | ||
{ | ||
"include": "#comments" | ||
} | ||
] | ||
}, | ||
"colonAndHashIdent": { | ||
"match": "(:)\\s*(#)\\s*([$_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\])", | ||
"captures": { | ||
"1": { | ||
"name": "keyword.operator.colon" | ||
}, | ||
"2": { | ||
"name": "entity.name.tag.hash.cds" | ||
}, | ||
"3": { | ||
"name": "entity.name.tag.cds" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"include": "#comments" | ||
} | ||
] | ||
}, | ||
"colonAndConstant": { | ||
"match": "(?i)(:)\\s*(null|true|false)\\b", | ||
"captures": { | ||
"1": { | ||
"name": "keyword.operator.colon" | ||
}, | ||
"2": { | ||
"name": "constant.language.cds" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"include": "#comments" | ||
} | ||
] | ||
}, | ||
"literalValue": { | ||
"comment": "the rules grouped here, when preceded by ':', are found in their own separate rules", | ||
"patterns": [ | ||
{ | ||
"comment": "'#' ident", | ||
"match": "(#)\\s*([$_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\])", | ||
"captures": { | ||
"1": { | ||
"name": "entity.name.tag.hash.cds" | ||
}, | ||
"2": { | ||
"name": "entity.name.tag.cds" | ||
} | ||
} | ||
}, | ||
{ | ||
"match": "(?i)\\b(?:null|true|false)\\b", | ||
"name": "constant.language.cds" | ||
}, | ||
{ | ||
"include": "#numbers" | ||
}, | ||
{ | ||
"include": "#strings" | ||
}, | ||
{ | ||
"comment": "quotedLiteral", | ||
"match": "(?i)\\b(x|date|time(?:stamp)?)\\s*((')[^']*('))", | ||
"captures": { | ||
"1": { | ||
"name": "support.class.cds" | ||
}, | ||
"2": { | ||
"name": "string.quoted.single.cds" | ||
}, | ||
"3": { | ||
"name": "punctuation.definition.string.begin.cds" | ||
}, | ||
"4": { | ||
"name": "punctuation.definition.string.end.cds" | ||
} | ||
} | ||
}, | ||
{ | ||
"comment": "TODO include '(' condition ')'" | ||
} | ||
] | ||
}, | ||
"bracketedExpression": { | ||
"begin": "\\(", | ||
"beginCaptures": { | ||
"0": { | ||
"name": "punctuation.section.scope.begin.cds" | ||
} | ||
}, | ||
"end": "\\)", | ||
"endCaptures": { | ||
"0": { | ||
"name": "punctuation.section.scope.end.cds" | ||
} | ||
}, | ||
"patterns": [ | ||
{ | ||
"include": "#bracedElementDef" | ||
}, | ||
{ | ||
"include": "#keywords" | ||
}, | ||
{ | ||
"match": "(?i)(?<!@|select from )(?:\\$?\\b[_a-zA-Z][$_a-zA-Z0-9]*|\"[^\"]*(?:\"\"[^\"]*)*\"|!\\[[^\\]]*(?:\\]\\][^\\]]*)*\\])", | ||
"captures": { | ||
"0": { | ||
"name": "entity.other.attribute-name.cds" | ||
} | ||
} | ||
}, | ||
{ | ||
"include": "#identifiers" | ||
}, | ||
{ | ||
"include": "#operators" | ||
} | ||
] | ||
} | ||
@@ -1064,0 +1386,0 @@ }, |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
1839940
9180
20
+ Added@sap/cds-compiler@4.3.0(transitive)
+ Added@types/mdast@3.0.13(transitive)
+ Addedvscode-jsonrpc@8.2.0(transitive)
+ Addedvscode-languageserver@9.0.1(transitive)
+ Addedvscode-languageserver-protocol@3.17.5(transitive)
+ Addedvscode-languageserver-textdocument@1.0.11(transitive)
+ Addedvscode-languageserver-types@3.17.5(transitive)
- Removed@sap/cds-compiler@4.2.2(transitive)
- Removed@types/mdast@3.0.12(transitive)
- Removedvscode-jsonrpc@8.1.0(transitive)
- Removedvscode-languageserver@8.1.0(transitive)
- Removedvscode-languageserver-protocol@3.17.3(transitive)
- Removedvscode-languageserver-textdocument@1.0.8(transitive)
- Removedvscode-languageserver-types@3.17.3(transitive)
Updated@sap/cds-compiler@4.3.0
Updatedvscode-languageserver@9.0.1