diff --git a/docs/src/lexer/safe_ds_lexer/_safe_ds_lexer.py b/docs/src/lexer/safe_ds_lexer/_safe_ds_lexer.py index 922f5ccf1..5be9a27b3 100644 --- a/docs/src/lexer/safe_ds_lexer/_safe_ds_lexer.py +++ b/docs/src/lexer/safe_ds_lexer/_safe_ds_lexer.py @@ -68,7 +68,7 @@ ) identifier_fragment = r"[_a-zA-Z][_a-zA-Z0-9]*" -identifier_regex = rf"{identifier_fragment}|`{identifier_fragment}`" +identifier_regex = rf"{identifier_fragment}|^{identifier_fragment}" qualified_name_regex = rf"({identifier_regex})(\.({identifier_regex}))*" diff --git a/packages/safe-ds-lang/src/language/grammar/safe-ds-value-converter.ts b/packages/safe-ds-lang/src/language/grammar/safe-ds-value-converter.ts index 6e769d686..a9a1e8379 100644 --- a/packages/safe-ds-lang/src/language/grammar/safe-ds-value-converter.ts +++ b/packages/safe-ds-lang/src/language/grammar/safe-ds-value-converter.ts @@ -4,7 +4,7 @@ export class SafeDsValueConverter extends DefaultValueConverter { protected override runConverter(rule: GrammarAST.AbstractRule, input: string, cstNode: CstNode): ValueType { switch (rule.name.toUpperCase()) { case 'ID': - return input.replaceAll('`', ''); + return input.replace(/^\^/u, ''); case 'INT': return ValueConverter.convertBigint(input); case 'STRING': diff --git a/packages/safe-ds-lang/src/language/grammar/safe-ds.langium b/packages/safe-ds-lang/src/language/grammar/safe-ds.langium index fefadd2d9..c28cd5e9d 100644 --- a/packages/safe-ds-lang/src/language/grammar/safe-ds.langium +++ b/packages/safe-ds-lang/src/language/grammar/safe-ds.langium @@ -1097,7 +1097,7 @@ SdsColumn returns SdsColumn: // Terminals // ----------------------------------------------------------------------------- -terminal ID returns string: IDENTIFIER | '`' IDENTIFIER '`'; +terminal ID returns string: IDENTIFIER | '^' IDENTIFIER; terminal fragment IDENTIFIER: /[_a-zA-Z][_a-zA-Z0-9]*/; terminal FLOAT returns number diff --git a/packages/safe-ds-lang/src/language/validation/other/declarations/placeholders.ts b/packages/safe-ds-lang/src/language/validation/other/declarations/placeholders.ts index 9479b1b8d..4584c116a 100644 --- a/packages/safe-ds-lang/src/language/validation/other/declarations/placeholders.ts +++ b/packages/safe-ds-lang/src/language/validation/other/declarations/placeholders.ts @@ -40,7 +40,7 @@ export const placeholdersMustNotBeAnAlias = (node: SdsPlaceholder, accept: Valid export const placeholderShouldBeUsed = (services: SafeDsServices) => (node: SdsPlaceholder, accept: ValidationAcceptor) => { // Don't a warning if the placeholder's name starts with an underscore - if (node.name.startsWith('_')) { + if (!node.name || node.name.startsWith('_')) { return; } diff --git a/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/ExperimentalCell.sdsstub b/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/ExperimentalCell.sdsstub index 131ac95c2..10655355d 100644 --- a/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/ExperimentalCell.sdsstub +++ b/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/ExperimentalCell.sdsstub @@ -19,7 +19,7 @@ class ExperimentalCell { */ @Pure @PythonName("not_") - fun `not`() -> result: ExperimentalCell + fun ^not() -> result: ExperimentalCell /** * Perform a boolean AND operation. This is equivalent to the `&` operator. @@ -33,7 +33,7 @@ class ExperimentalCell { */ @Pure @PythonName("and_") - fun `and`( + fun ^and( other: union> ) -> result: ExperimentalCell @@ -49,7 +49,7 @@ class ExperimentalCell { */ @Pure @PythonName("or_") - fun `or`( + fun ^or( other: union> ) -> result: ExperimentalCell @@ -191,7 +191,7 @@ class ExperimentalCell { * } */ @Pure - fun `sub`( + fun ^sub( other: Any ) -> result: ExperimentalCell diff --git a/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/ExperimentalRow.sdsstub b/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/ExperimentalRow.sdsstub index 180933fef..f93084895 100644 --- a/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/ExperimentalRow.sdsstub +++ b/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/ExperimentalRow.sdsstub @@ -21,7 +21,7 @@ class ExperimentalRow { /** * The schema of the row. */ - attr `schema`: ExperimentalSchema + attr ^schema: ExperimentalSchema /** * Get the value of the specified column. diff --git a/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/ExperimentalTable.sdsstub b/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/ExperimentalTable.sdsstub index 14ad7bc5f..989df667f 100644 --- a/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/ExperimentalTable.sdsstub +++ b/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/ExperimentalTable.sdsstub @@ -55,7 +55,7 @@ class ExperimentalTable( /** * The schema of the table. */ - attr `schema`: ExperimentalSchema + attr ^schema: ExperimentalSchema /** * Create a table from a list of columns. diff --git a/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/Row.sdsstub b/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/Row.sdsstub index e54cfbe50..0798d2520 100644 --- a/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/Row.sdsstub +++ b/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/Row.sdsstub @@ -47,10 +47,10 @@ class Row( * @example * pipeline example { * val row = Row({"a": 1, "b": 2}); - * val `schema` = row.`schema`; + * val ^schema = row.^schema; * } */ - attr `schema`: Schema + attr ^schema: Schema /** * Create a row from a dictionary that maps column names to column values. diff --git a/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/Table.sdsstub b/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/Table.sdsstub index f4e5b274e..fa90270fc 100644 --- a/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/Table.sdsstub +++ b/packages/safe-ds-lang/src/resources/builtins/safeds/data/tabular/containers/Table.sdsstub @@ -67,10 +67,10 @@ class Table( * @example * pipeline example { * val table = Table({"a": [1, 2], "b": [3, 4]}); - * val `schema` = table.`schema`; + * val ^schema = table.^schema; * } */ - attr `schema`: Schema + attr ^schema: Schema /** * Read data from a CSV file into a table. diff --git a/packages/safe-ds-lang/tests/language/grammar/safe-ds-value-converter.test.ts b/packages/safe-ds-lang/tests/language/grammar/safe-ds-value-converter.test.ts index 9731d6301..558f3d895 100644 --- a/packages/safe-ds-lang/tests/language/grammar/safe-ds-value-converter.test.ts +++ b/packages/safe-ds-lang/tests/language/grammar/safe-ds-value-converter.test.ts @@ -17,18 +17,18 @@ const services = (await createSafeDsServices(EmptyFileSystem, { omitBuiltins: tr describe('runConverter', () => { describe('ID', () => { - it('should remove backticks (package)', async () => { + it('should remove hat (package)', async () => { const code = ` - package \`foo\`.bar + package ^foo.bar `; const module = await getNodeOfType(services, code, isSdsModule); expect(module.name).toBe('foo.bar'); }); - it('should remove backticks (declaration)', async () => { + it('should remove hat (declaration)', async () => { const code = ` - class \`MyClass\` + class ^MyClass `; const firstClass = await getNodeOfType(services, code, isSdsClass); diff --git a/packages/safe-ds-lang/tests/resources/call graph/block lambda call/argument/segment.sdsdev b/packages/safe-ds-lang/tests/resources/call graph/block lambda call/argument/segment.sdsdev index 846cf3ec4..4bec29bf1 100644 --- a/packages/safe-ds-lang/tests/resources/call graph/block lambda call/argument/segment.sdsdev +++ b/packages/safe-ds-lang/tests/resources/call graph/block lambda call/argument/segment.sdsdev @@ -1,4 +1,4 @@ -package tests.callGraph.blockLambdaCall.argument.`segment` +package tests.callGraph.blockLambdaCall.argument.^segment @Pure fun f() diff --git a/packages/safe-ds-lang/tests/resources/call graph/callable/class.sdsdev b/packages/safe-ds-lang/tests/resources/call graph/callable/class.sdsdev index 68ec26466..663245a07 100644 --- a/packages/safe-ds-lang/tests/resources/call graph/callable/class.sdsdev +++ b/packages/safe-ds-lang/tests/resources/call graph/callable/class.sdsdev @@ -1,4 +1,4 @@ -package tests.callGraph.callable.`class` +package tests.callGraph.callable.^class @Pure fun f() -> r: Any @Pure fun g() diff --git a/packages/safe-ds-lang/tests/resources/call graph/callable/segment.sdsdev b/packages/safe-ds-lang/tests/resources/call graph/callable/segment.sdsdev index 47286ed21..154ac564c 100644 --- a/packages/safe-ds-lang/tests/resources/call graph/callable/segment.sdsdev +++ b/packages/safe-ds-lang/tests/resources/call graph/callable/segment.sdsdev @@ -1,4 +1,4 @@ -package tests.callGraph.callable.`segment` +package tests.callGraph.callable.^segment @Pure fun f() -> r: Any @Pure fun g() -> r: Any diff --git a/packages/safe-ds-lang/tests/resources/call graph/expression lambda call/argument/segment.sdsdev b/packages/safe-ds-lang/tests/resources/call graph/expression lambda call/argument/segment.sdsdev index 4346e3b05..5ef813089 100644 --- a/packages/safe-ds-lang/tests/resources/call graph/expression lambda call/argument/segment.sdsdev +++ b/packages/safe-ds-lang/tests/resources/call graph/expression lambda call/argument/segment.sdsdev @@ -1,4 +1,4 @@ -package tests.callGraph.expressionLambdaCall.argument.`segment` +package tests.callGraph.expressionLambdaCall.argument.^segment @Pure fun f() diff --git a/packages/safe-ds-lang/tests/resources/call graph/segment call/argument/segment.sdsdev b/packages/safe-ds-lang/tests/resources/call graph/segment call/argument/segment.sdsdev index 7ce228e82..5039f3a7b 100644 --- a/packages/safe-ds-lang/tests/resources/call graph/segment call/argument/segment.sdsdev +++ b/packages/safe-ds-lang/tests/resources/call graph/segment call/argument/segment.sdsdev @@ -1,4 +1,4 @@ -package tests.callGraph.segmentCall.argument.`segment` +package tests.callGraph.segmentCall.argument.^segment @Pure fun f() diff --git a/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/this/input.sdsdev b/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/this/input.sdsdev index a589e52cf..5fa46317d 100644 --- a/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/this/input.sdsdev +++ b/packages/safe-ds-lang/tests/resources/generation/python/runner integration/expressions/this/input.sdsdev @@ -1,4 +1,4 @@ -package tests.generator.runnerIntegration.expressions.`this` +package tests.generator.runnerIntegration.expressions.^this class MyClass() { @Pure diff --git a/packages/safe-ds-lang/tests/resources/grammar/keywords as names/good-escapedKeywords.sdsdev b/packages/safe-ds-lang/tests/resources/grammar/keywords as names/good-escapedKeywords.sdsdev index abfb97326..17e12296d 100644 --- a/packages/safe-ds-lang/tests/resources/grammar/keywords as names/good-escapedKeywords.sdsdev +++ b/packages/safe-ds-lang/tests/resources/grammar/keywords as names/good-escapedKeywords.sdsdev @@ -1,35 +1,35 @@ // $TEST$ no_syntax_error -class `_` -class `and` -class `annotation` -class `as` -class `attr` -class `class` -class `const` -class `enum` -class `false` -class `from` -class `fun` -class `import` -class `in` -class `internal` -class `literal` -class `not` -class `null` -class `or` -class `out` -class `package` -class `pipeline` -class `private` -class `schema` -class `static` -class `segment` -class `sub` -class `this` -class `true` -class `union` -class `unknown` -class `val` -class `where` -class `yield` +class ^_ +class ^and +class ^annotation +class ^as +class ^attr +class ^class +class ^const +class ^enum +class ^false +class ^from +class ^fun +class ^import +class ^in +class ^internal +class ^literal +class ^not +class ^null +class ^or +class ^out +class ^package +class ^pipeline +class ^private +class ^schema +class ^static +class ^segment +class ^sub +class ^this +class ^true +class ^union +class ^unknown +class ^val +class ^where +class ^yield diff --git a/packages/safe-ds-lang/tests/resources/grammar/keywords as names/good-escapedNonKeyword.sdsdev b/packages/safe-ds-lang/tests/resources/grammar/keywords as names/good-escapedNonKeyword.sdsdev index 2a9df26cb..4755ecb24 100644 --- a/packages/safe-ds-lang/tests/resources/grammar/keywords as names/good-escapedNonKeyword.sdsdev +++ b/packages/safe-ds-lang/tests/resources/grammar/keywords as names/good-escapedNonKeyword.sdsdev @@ -1,3 +1,3 @@ // $TEST$ no_syntax_error -class `Bla` +class ^Bla diff --git a/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/and/main.sdsdev b/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/and/main.sdsdev index f9df89747..69911f9b2 100644 --- a/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/and/main.sdsdev +++ b/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/and/main.sdsdev @@ -1,4 +1,4 @@ -package tests.partialValidation.recursiveCases.infixOperations.`and` +package tests.partialValidation.recursiveCases.infixOperations.^and pipeline test { // $TEST$ serialization false diff --git a/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/and/short circuiting.sdsdev b/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/and/short circuiting.sdsdev index 6a17bac20..9b58c8c6f 100644 --- a/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/and/short circuiting.sdsdev +++ b/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/and/short circuiting.sdsdev @@ -1,4 +1,4 @@ -package tests.partialValidation.recursiveCases.infixOperations.`and` +package tests.partialValidation.recursiveCases.infixOperations.^and @Pure fun pureFunction() -> result: Boolean diff --git a/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/or/main.sdsdev b/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/or/main.sdsdev index 5df518f95..f00ef873d 100644 --- a/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/or/main.sdsdev +++ b/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/or/main.sdsdev @@ -1,4 +1,4 @@ -package tests.partialValidation.recursiveCases.infixOperations.`or` +package tests.partialValidation.recursiveCases.infixOperations.^or pipeline test { // $TEST$ serialization false diff --git a/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/or/short circuiting.sdsdev b/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/or/short circuiting.sdsdev index 0fa82fc06..5789f2ed0 100644 --- a/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/or/short circuiting.sdsdev +++ b/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/infix operations/or/short circuiting.sdsdev @@ -1,4 +1,4 @@ -package tests.partialValidation.recursiveCases.infixOperations.`or` +package tests.partialValidation.recursiveCases.infixOperations.^or @Pure fun pureFunction() -> result: Boolean diff --git a/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/prefix operations/not/main.sdsdev b/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/prefix operations/not/main.sdsdev index 84c8e97aa..5108f288f 100644 --- a/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/prefix operations/not/main.sdsdev +++ b/packages/safe-ds-lang/tests/resources/partial evaluation/recursive cases/prefix operations/not/main.sdsdev @@ -1,4 +1,4 @@ -package tests.partialValidation.recursiveCases.prefixOperations.`not` +package tests.partialValidation.recursiveCases.prefixOperations.^not pipeline test { // $TEST$ serialization true diff --git a/packages/safe-ds-lang/tests/resources/typing/expressions/this/main.sdsdev b/packages/safe-ds-lang/tests/resources/typing/expressions/this/main.sdsdev index 80dd8f340..16180cfe2 100644 --- a/packages/safe-ds-lang/tests/resources/typing/expressions/this/main.sdsdev +++ b/packages/safe-ds-lang/tests/resources/typing/expressions/this/main.sdsdev @@ -1,4 +1,4 @@ -package tests.typing.expressions.`this` +package tests.typing.expressions.^this // $TEST$ serialization unknown annotation MyAnnotation(p: Any? = »this«) diff --git a/packages/safe-ds-lang/tests/resources/typing/highest common subtype/unhandled type/main.sdsdev b/packages/safe-ds-lang/tests/resources/typing/highest common subtype/unhandled type/main.sdsdev index 15f6062da..23f3850ce 100644 --- a/packages/safe-ds-lang/tests/resources/typing/highest common subtype/unhandled type/main.sdsdev +++ b/packages/safe-ds-lang/tests/resources/typing/highest common subtype/unhandled type/main.sdsdev @@ -6,7 +6,7 @@ segment mySegment( one: Contravariant>, oneOrNull: Contravariant>, - `union`: Contravariant>, + ^union: Contravariant>, unionOrNull: Contravariant>, callable: Contravariant<() -> ()>, @@ -14,10 +14,10 @@ segment mySegment( // Named tuple types and static types are also not handled, but we can't test them here ) { // $TEST$ serialization List> - »[one, `union`]«; + »[one, ^union]«; // $TEST$ serialization List> - »[oneOrNull, `union`]«; + »[oneOrNull, ^union]«; // $TEST$ serialization List> »[one, unionOrNull]«; diff --git a/packages/safe-ds-lang/tests/resources/validation/builtins/annotations/pythonMacro/main.sdsdev b/packages/safe-ds-lang/tests/resources/validation/builtins/annotations/pythonMacro/main.sdsdev index 65d89fce2..7a28888ee 100644 --- a/packages/safe-ds-lang/tests/resources/validation/builtins/annotations/pythonMacro/main.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/builtins/annotations/pythonMacro/main.sdsdev @@ -7,7 +7,7 @@ class MyClass { // $TEST$ no error r"The template expressions? .* cannot be interpreted." @»PythonMacro«("myMethod2($this)") - fun myMethod2(`this`: Int) + fun myMethod2(^this: Int) // $TEST$ no error "The template expression '$this' cannot be interpreted." @»PythonMacro«("myMethod3($this)") @@ -28,7 +28,7 @@ fun myFunction1(param: Int) // $TEST$ no error r"The template expressions? .* cannot be interpreted." @»PythonMacro«("myFunction2($this)") -fun myFunction2(`this`: Int) +fun myFunction2(^this: Int) // $TEST$ error "The template expression '$this' cannot be interpreted." @»PythonMacro«("myFunction3($this)") diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/annotations.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/annotations.sdsdev index d1b1be50e..b9fd0d0ae 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/annotations.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/annotations.sdsdev @@ -3,7 +3,7 @@ package tests.validation.names.casing // $TEST$ no warning "Names of annotations should be UpperCamelCase." annotation »AnnotationUppercase1« // $TEST$ no warning "Names of annotations should be UpperCamelCase." -annotation »`AnnotationUppercase2`« +annotation »^AnnotationUppercase2« // $TEST$ warning "Names of annotations should be UpperCamelCase." annotation »annotationLowercase« // $TEST$ warning "Names of annotations should be UpperCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/attributes.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/attributes.sdsdev index 66099ce62..cd4eaf174 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/attributes.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/attributes.sdsdev @@ -6,7 +6,7 @@ class MyClass { // $TEST$ no warning "Names of attributes should be lowerCamelCase." attr »attributeLowercase1«: Int // $TEST$ no warning "Names of attributes should be lowerCamelCase." - attr »`attributeLowercase2`«: Int + attr »^attributeLowercase2«: Int // $TEST$ warning "Names of attributes should be lowerCamelCase." attr »_attributeUnderscore«: Int // $TEST$ warning "Names of attributes should be lowerCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/block lambda results.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/block lambda results.sdsdev index 63ca47c34..6804fe3a1 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/block lambda results.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/block lambda results.sdsdev @@ -7,7 +7,7 @@ pipeline myPipeline1 { // $TEST$ no warning "Names of block lambda results should be lowerCamelCase." yield »lambdaResultLowercase1« = 1; // $TEST$ no warning "Names of block lambda results should be lowerCamelCase." - yield »`lambdaResultLowercase2`« = 1; + yield »^lambdaResultLowercase2« = 1; // $TEST$ warning "Names of block lambda results should be lowerCamelCase." yield »_lambdaResultUnderscore« = 1; // $TEST$ warning "Names of block lambda results should be lowerCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/classes.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/classes.sdsdev index 8c571f723..36eb1af82 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/classes.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/classes.sdsdev @@ -3,7 +3,7 @@ package tests.validation.names.casing // $TEST$ no warning "Names of classes should be UpperCamelCase." class »ClassUppercase1« // $TEST$ no warning "Names of classes should be UpperCamelCase." -class »`ClassUppercase2`« +class »^ClassUppercase2« // $TEST$ warning "Names of classes should be UpperCamelCase." class »classLowercase« // $TEST$ warning "Names of classes should be UpperCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/enum variants.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/enum variants.sdsdev index 11fbe086d..37ac68bd9 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/enum variants.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/enum variants.sdsdev @@ -4,7 +4,7 @@ enum MyEnum { // $TEST$ no warning "Names of enum variants should be UpperCamelCase." »EnumVariantUppercase1« // $TEST$ no warning "Names of enum variants should be UpperCamelCase." - »`EnumVariantUppercase2`« + »^EnumVariantUppercase2« // $TEST$ warning "Names of enum variants should be UpperCamelCase." »enumVariantLowercase« // $TEST$ warning "Names of enum variants should be UpperCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/enums.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/enums.sdsdev index 90bf4cf02..effe2bda6 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/enums.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/enums.sdsdev @@ -3,7 +3,7 @@ package tests.validation.names.casing // $TEST$ no warning "Names of enums should be UpperCamelCase." enum »EnumUppercase1« // $TEST$ no warning "Names of enums should be UpperCamelCase." -enum »`EnumUppercase2`« +enum »^EnumUppercase2« // $TEST$ warning "Names of enums should be UpperCamelCase." enum »enumLowercase« // $TEST$ warning "Names of enums should be UpperCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/functions.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/functions.sdsdev index 41d16b3dd..02a7e6a6f 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/functions.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/functions.sdsdev @@ -5,7 +5,7 @@ fun »FunctionUppercase«() // $TEST$ no warning "Names of functions should be lowerCamelCase." fun »functionLowercase1«() // $TEST$ no warning "Names of functions should be lowerCamelCase." -fun »`functionLowercase2`«() +fun »^functionLowercase2«() // $TEST$ warning "Names of functions should be lowerCamelCase." fun »_functionUnderscore«() // $TEST$ warning "Names of functions should be lowerCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/package name lowercase escaped.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/package name lowercase escaped.sdsdev index c5bf85806..faed5f630 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/package name lowercase escaped.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/package name lowercase escaped.sdsdev @@ -1,2 +1,2 @@ // $TEST$ no warning "All segments of the qualified name of a package should be lowerCamelCase." -package »tests.validation.declarations.`lowercase1`« +package »tests.validation.declarations.^lowercase1« diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/parameters.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/parameters.sdsdev index 59b575730..64bef6d7a 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/parameters.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/parameters.sdsdev @@ -6,7 +6,7 @@ fun myFunction1( // $TEST$ no warning "Names of parameters should be lowerCamelCase." »parameterLowercase1«: Int, // $TEST$ no warning "Names of parameters should be lowerCamelCase." - »`parameterLowercase2`«: Int, + »^parameterLowercase2«: Int, // $TEST$ warning "Names of parameters should be lowerCamelCase." »_parameterUnderscore«: Int, // $TEST$ warning "Names of parameters should be lowerCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/pipelines.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/pipelines.sdsdev index c9a46ef9b..c66b48fb8 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/pipelines.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/pipelines.sdsdev @@ -5,7 +5,7 @@ pipeline »PipelineUppercase« {} // $TEST$ no warning "Names of pipelines should be lowerCamelCase." pipeline »pipelineLowercase1« {} // $TEST$ no warning "Names of pipelines should be lowerCamelCase." -pipeline »`pipelineLowercase2`« {} +pipeline »^pipelineLowercase2« {} // $TEST$ warning "Names of pipelines should be lowerCamelCase." pipeline »_pipelineUnderscore« {} // $TEST$ warning "Names of pipelines should be lowerCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/placeholders.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/placeholders.sdsdev index b7662a4d2..4cd221321 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/placeholders.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/placeholders.sdsdev @@ -6,7 +6,7 @@ pipeline myPipeline2 { // $TEST$ no warning "Names of used placeholders should be lowerCamelCase."" val »usedPlaceholderLowercase1« = 1; // $TEST$ no warning "Names of used placeholders should be lowerCamelCase."" - val »`usedPlaceholderLowercase2`« = 1; + val »^usedPlaceholderLowercase2« = 1; // $TEST$ warning "Names of used placeholders should be lowerCamelCase." val »_usedPlaceholderUnderscore« = 1; // $TEST$ warning "Names of used placeholders should be lowerCamelCase." @@ -17,7 +17,7 @@ pipeline myPipeline2 { // $TEST$ no warning "Names of unused placeholders should be lowerCamelCase. with an optional leading underscore." val »unusedPlaceholderLowercase1« = usedPlaceholderLowercase1 + 1; // $TEST$ no warning "Names of unused placeholders should be lowerCamelCase. with an optional leading underscore." - val »`unusedPlaceholderLowercase2`« = usedPlaceholderLowercase2 + 1; + val »^unusedPlaceholderLowercase2« = usedPlaceholderLowercase2 + 1; // $TEST$ no warning "Names of unused placeholders should be lowerCamelCase with an optional leading underscore." val »_unusedPlaceholderUnderscore« = _usedPlaceholderUnderscore + 1; // $TEST$ warning "Names of unused placeholders should be lowerCamelCase with an optional leading underscore." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/results.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/results.sdsdev index f0d2a0483..e884c4818 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/results.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/results.sdsdev @@ -6,7 +6,7 @@ fun myFunction2() -> ( // $TEST$ no warning "Names of results should be lowerCamelCase." »resultLowercase1«: Int, // $TEST$ no warning "Names of results should be lowerCamelCase." - »`resultLowercase2`«: Int, + »^resultLowercase2«: Int, // $TEST$ warning "Names of results should be lowerCamelCase." »_resultUnderscore«: Int, // $TEST$ warning "Names of results should be lowerCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/schemas.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/schemas.sdsdev index a456b7646..d735f2c8b 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/schemas.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/schemas.sdsdev @@ -3,7 +3,7 @@ package tests.validation.names.casing // $TEST$ no warning "Names of schemas should be UpperCamelCase." schema »SchemaUppercase1« {} // $TEST$ no warning "Names of schemas should be UpperCamelCase." -schema »`SchemaUppercase2`« {} +schema »^SchemaUppercase2« {} // $TEST$ warning "Names of schemas should be UpperCamelCase." schema »schemaLowercase« {} // $TEST$ warning "Names of schemas should be UpperCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/segments.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/segments.sdsdev index b06585eb8..60e04e2d7 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/segments.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/segments.sdsdev @@ -5,7 +5,7 @@ segment »SegmentUppercase«() {} // $TEST$ no warning "Names of segments should be lowerCamelCase." segment »segmentLowercase1«() {} // $TEST$ no warning "Names of segments should be lowerCamelCase." -segment »`segmentLowercase2`«() {} +segment »^segmentLowercase2«() {} // $TEST$ warning "Names of segments should be lowerCamelCase." segment »_segmentUnderscore«() {} // $TEST$ warning "Names of segments should be lowerCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/names/casing/type parameters.sdsdev b/packages/safe-ds-lang/tests/resources/validation/names/casing/type parameters.sdsdev index 267bec768..56d60c3bf 100644 --- a/packages/safe-ds-lang/tests/resources/validation/names/casing/type parameters.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/names/casing/type parameters.sdsdev @@ -4,7 +4,7 @@ fun myFunction3< // $TEST$ no warning "Names of type parameters should be UpperCamelCase." »TypeParameterUppercase1«, // $TEST$ no warning "Names of type parameters should be UpperCamelCase." - »`TypeParameterUppercase2`«, + »^TypeParameterUppercase2«, // $TEST$ warning "Names of type parameters should be UpperCamelCase." »typeParameterLowercase«, // $TEST$ warning "Names of type parameters should be UpperCamelCase." diff --git a/packages/safe-ds-lang/tests/resources/validation/other/expressions/this/must refer to class instance/main.sdsdev b/packages/safe-ds-lang/tests/resources/validation/other/expressions/this/must refer to class instance/main.sdsdev index 969107294..78a648cd2 100644 --- a/packages/safe-ds-lang/tests/resources/validation/other/expressions/this/must refer to class instance/main.sdsdev +++ b/packages/safe-ds-lang/tests/resources/validation/other/expressions/this/must refer to class instance/main.sdsdev @@ -1,4 +1,4 @@ -package tests.validation.other.expressions.`this`.mustReferToClassInstance +package tests.validation.other.expressions.^this.mustReferToClassInstance // $TEST$ error "The keyword 'this' must refer to a class instance." annotation MyAnnotation(p: Any? = »this«) diff --git a/packages/safe-ds-vscode/language-configuration.json b/packages/safe-ds-vscode/language-configuration.json index 350fc8ad1..9f958dac6 100644 --- a/packages/safe-ds-vscode/language-configuration.json +++ b/packages/safe-ds-vscode/language-configuration.json @@ -14,7 +14,6 @@ { "open": "{", "close": "}", "notIn": ["string", "comment"] }, { "open": "[", "close": "]", "notIn": ["string", "comment"] }, { "open": "\"", "close": "\"", "notIn": ["string", "comment"] }, - { "open": "`", "close": "`", "notIn": ["string", "comment"] }, { "open": "»", "close": "«", "notIn": ["string", "comment"] }, { "open": "/*", "close": " */", "notIn": ["string", "comment"] } ], @@ -24,7 +23,6 @@ ["[", "]"], ["<", ">"], ["\"", "\""], - ["`", "`"], ["»", "«"] ] } diff --git a/packages/safe-ds-vscode/syntaxes/safe-ds.tmLanguage.json b/packages/safe-ds-vscode/syntaxes/safe-ds.tmLanguage.json index ca1a721fe..adbacd5b5 100644 --- a/packages/safe-ds-vscode/syntaxes/safe-ds.tmLanguage.json +++ b/packages/safe-ds-vscode/syntaxes/safe-ds.tmLanguage.json @@ -37,8 +37,8 @@ }, { "name": "meta.safe-ds", - "begin": "\\`", - "end": "\\`" + "begin": "\\^", + "end": "\\b" }, { "name": "string.interpolated.safe-ds",