From c439c19e2880b3e6218c2b1284bbd4d5e00d0d42 Mon Sep 17 00:00:00 2001 From: Lars Reimann Date: Thu, 13 Apr 2023 22:37:47 +0200 Subject: [PATCH] feat: Langium grammar (#470) Closes partially #433. ### Summary of Changes * Recreate grammar in [Langium](https://github.com/langium/langium) ### TODOs - [x] More grammar tests - [x] declarations - [x] expressions - [x] keywords as names - [x] modules - [x] schema - [x] statements - [x] trailing commas - [x] types - [x] Document how to write grammar tests - [X] Resolve the grammar ambiguity warning - [X] Fix error when hovering over modules members or class members --------- Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com> --- .eslintignore | 3 + .github/workflows/main.yml | 6 + .github/workflows/pr.yml | 6 + .gitignore | 1 + DSL-langium/bin/cli | 2 +- DSL-langium/langium-config.json | 2 +- DSL-langium/language-configuration.json | 10 +- DSL-langium/package-lock.json | 1470 +++++++++++------ DSL-langium/package.json | 13 +- DSL-langium/src/extension.ts | 4 +- .../constant/fileExtensions.ts | 24 +- .../language-server/grammar/safe-ds.langium | 1193 ++++++++++++- DSL-langium/src/language-server/main.ts | 1 + DSL-langium/syntaxes/safe-ds.tmLanguage.json | 60 - DSL-langium/tests/grammar/IssueFinderTest.kt | 163 -- DSL-langium/tests/grammar/testGrammar.test.ts | 124 ++ DSL-langium/tests/helpers/testChecks.ts | 2 +- .../tests/helpers/testResources.test.ts | 15 +- DSL-langium/tests/helpers/testResources.ts | 15 +- .../good-complex example.sdstest | 11 - .../bad-unclosed argument list.sdstest | 4 + .../good-empty argument list.sdstest | 4 + .../good-multiple arguments.sdstest | 4 + .../good-named argument.sdstest | 4 + .../good-no argument list.sdstest | 4 + .../good-positional argument.sdstest | 4 + .../grammar/declarations/annotation.sdstest | 11 - .../declarations/annotationUse.sdstest | 3 - .../bad-unclosed constraint list.sdstest | 3 + .../bad-unclosed parameter list.sdstest | 3 + .../annotations/good-annotation call.sdstest | 4 + .../good-empty parameter list.sdstest | 3 + .../good-multiple parameters.sdstest | 12 + .../good-no parameter list.sdstest | 3 + .../good-with multiple constraints.sdstest | 6 + .../good-with sub constraint.sdstest | 5 + .../good-with super constraint.sdstest | 5 + ...good-with typed optional parameter.sdstest | 3 + ...good-with typed required parameter.sdstest | 3 + ...dic parameter (with default value).sdstest | 3 + ...good-with typed variadic parameter.sdstest | 3 + ...od-with untyped optional parameter.sdstest | 3 + ...od-with untyped required parameter.sdstest | 3 + ...dic parameter (with default value).sdstest | 3 + ...od-with untyped variadic parameter.sdstest | 3 + .../grammar/declarations/class.sdstest | 19 - .../classes/attributes/good-annotated.sdstest | 5 + .../classes/attributes/good-no type.sdstest | 5 + .../classes/attributes/good-static.sdstest | 5 + .../classes/attributes/good-with type.sdstest | 5 + .../bad-empty parent type list.sdstest} | 2 +- .../classes/bad-unclosed body.sdstest} | 2 +- .../bad-unclosed constraint list.sdstest | 3 + .../bad-unclosed parameter list.sdstest | 3 + .../bad-unclosed type parameter list.sdstest | 3 + .../good-annotated type parameter.sdstest | 3 + .../classes/good-annotation call.sdstest | 4 + .../good-contravariant type parameter.sdstest | 3 + .../good-covariant type parameter.sdstest | 3 + .../classes/good-empty body.sdstest | 3 + .../good-empty constraint list.sdstest | 3 + .../good-empty parameter list.sdstest} | 2 +- .../good-empty type parameter list.sdstest | 3 + .../good-invariant type parameter.sdstest | 3 + .../declarations/classes/good-minimal.sdstest | 3 + .../classes/good-multiple parameters.sdstest | 12 + .../good-multiple parent types.sdstest | 3 + .../good-multiple type parameters.sdstest | 3 + .../classes/good-one parent type.sdstest | 3 + .../good-with multiple constraints.sdstest | 6 + .../classes/good-with sub constraint.sdstest | 5 + .../good-with super constraint.sdstest | 5 + ...good-with typed optional parameter.sdstest | 3 + ...good-with typed required parameter.sdstest | 3 + ...dic parameter (with default value).sdstest | 3 + ...good-with typed variadic parameter.sdstest | 3 + ...od-with untyped optional parameter.sdstest | 3 + ...od-with untyped required parameter.sdstest | 3 + ...dic parameter (with default value).sdstest | 3 + ...od-with untyped variadic parameter.sdstest | 3 + .../bad-missing parameter list.sdstest | 5 + .../bad-unclosed constraint list.sdstest | 5 + .../bad-unclosed parameter list.sdstest | 5 + .../bad-unclosed type parameter list.sdstest | 5 + .../good-annotated type parameter.sdstest | 5 + .../methods/good-annotation call.sdstest | 6 + .../good-contravariant type parameter.sdstest | 5 + .../good-covariant type parameter.sdstest | 5 + .../good-empty constraint list.sdstest | 5 + .../good-empty type parameter list.sdstest | 5 + .../good-invariant type parameter.sdstest | 5 + .../methods/good-multiple parameters.sdstest | 14 + .../methods/good-multiple results.sdstest | 10 + .../good-multiple type parameters.sdstest | 5 + .../good-no parameters and no results.sdstest | 5 + .../good-no results (explicit).sdstest | 5 + ...-one typed result (in parentheses).sdstest | 5 + ...-one typed result (no parentheses).sdstest | 5 + ...ne untyped result (no parentheses).sdstest | 5 + ... untyped result (with parentheses).sdstest | 5 + .../classes/methods/good-static.sdstest | 5 + .../good-with multiple constraints.sdstest | 8 + .../methods/good-with sub constraint.sdstest | 7 + .../good-with super constraint.sdstest | 7 + ...good-with typed optional parameter.sdstest | 5 + ...good-with typed required parameter.sdstest | 5 + ...dic parameter (with default value).sdstest | 5 + ...good-with typed variadic parameter.sdstest | 5 + ...od-with untyped optional parameter.sdstest | 5 + ...od-with untyped required parameter.sdstest | 5 + ...dic parameter (with default value).sdstest | 5 + ...od-with untyped variadic parameter.sdstest | 5 + .../bad-empty parent type list.sdstest | 5 + .../nested classes/bad-unclosed body.sdstest | 5 + .../bad-unclosed constraint list.sdstest | 5 + .../bad-unclosed parameter list.sdstest | 5 + .../bad-unclosed type parameter list.sdstest | 5 + .../good-annotated type parameter.sdstest | 5 + .../good-annotation call.sdstest | 6 + .../good-contravariant type parameter.sdstest | 5 + .../good-covariant type parameter.sdstest | 5 + .../nested classes/good-empty body.sdstest | 5 + .../good-empty constraint list.sdstest | 5 + .../good-empty parameter list.sdstest | 5 + .../good-empty type parameter list.sdstest | 5 + .../good-invariant type parameter.sdstest | 5 + .../nested classes/good-minimal.sdstest | 5 + .../good-multiple parameters.sdstest | 14 + .../good-multiple parent types.sdstest | 5 + .../good-multiple type parameters.sdstest | 5 + .../nested classes/good-parent type.sdstest | 5 + .../good-with multiple constraints.sdstest | 8 + .../good-with sub constraint.sdstest | 7 + .../good-with super constraint.sdstest | 7 + ...good-with typed optional parameter.sdstest | 5 + ...good-with typed required parameter.sdstest | 5 + ...dic parameter (with default value).sdstest | 5 + ...good-with typed variadic parameter.sdstest | 5 + ...od-with untyped optional parameter.sdstest | 5 + ...od-with untyped required parameter.sdstest | 5 + ...dic parameter (with default value).sdstest | 5 + ...od-with untyped variadic parameter.sdstest | 5 + .../nested enums/bad-unclosed body.sdstest | 5 + .../nested enums/good-annotation call.sdstest | 6 + .../nested enums/good-empty body.sdstest | 5 + .../classes/nested enums/good-no body.sdstest | 5 + .../good-variants in body.sdstest | 7 + .../bad-unclosed constraint list.sdstest | 7 + .../bad-unclosed parameter list.sdstest | 7 + .../bad-unclosed type parameter list.sdstest | 7 + .../good-annotated type parameter.sdstest | 7 + .../variants/good-annotation call.sdstest | 8 + .../good-contravariant type parameter.sdstest | 7 + .../good-covariant type parameter.sdstest | 7 + .../good-empty type parameter list.sdstest | 7 + .../good-invariant type parameter.sdstest | 7 + .../variants/good-multiple parameters.sdstest | 16 + .../good-multiple type parameters.sdstest | 7 + .../variants/good-no parameter list.sdstest | 7 + .../good-with multiple constraints.sdstest | 10 + .../variants/good-with sub constraint.sdstest | 9 + .../good-with super constraint.sdstest | 9 + ...good-with typed optional parameter.sdstest | 7 + ...good-with typed required parameter.sdstest | 7 + ...dic parameter (with default value).sdstest | 7 + ...good-with typed variadic parameter.sdstest | 7 + ...od-with untyped optional parameter.sdstest | 7 + ...od-with untyped required parameter.sdstest | 7 + ...dic parameter (with default value).sdstest | 7 + ...od-with untyped variadic parameter.sdstest | 7 + .../grammar/declarations/enum.sdstest | 12 - .../enums/bad-unclosed body.sdstest} | 2 +- .../enums/good-annotation call.sdstest | 4 + .../enums/good-empty body.sdstest | 3 + .../declarations/enums/good-no body.sdstest | 3 + .../enums/good-variants in body.sdstest | 5 + .../bad-unclosed constraint list.sdstest | 5 + .../bad-unclosed parameter list.sdstest | 5 + .../bad-unclosed type parameter list.sdstest | 5 + .../good-annotated type parameter.sdstest | 5 + .../variants/good-annotation call.sdstest | 6 + .../good-contravariant type parameter.sdstest | 5 + .../good-covariant type parameter.sdstest | 5 + .../good-empty type parameter list.sdstest | 5 + .../good-invariant type parameter.sdstest | 5 + .../variants/good-multiple parameters.sdstest | 14 + .../good-multiple type parameters.sdstest | 5 + .../variants/good-no parameter list.sdstest | 5 + .../good-with multiple constraints.sdstest | 8 + .../variants/good-with sub constraint.sdstest | 7 + .../good-with super constraint.sdstest | 7 + ...good-with typed optional parameter.sdstest | 5 + ...good-with typed required parameter.sdstest | 5 + ...dic parameter (with default value).sdstest | 5 + ...good-with typed variadic parameter.sdstest | 5 + ...od-with untyped optional parameter.sdstest | 5 + ...od-with untyped required parameter.sdstest | 5 + ...dic parameter (with default value).sdstest | 5 + ...od-with untyped variadic parameter.sdstest | 5 + .../grammar/declarations/function.sdstest | 16 - .../bad-missing parameter list.sdstest | 3 + .../bad-unclosed constraint list.sdstest | 3 + .../bad-unclosed parameter list.sdstest | 3 + .../bad-unclosed type parameter list.sdstest | 3 + .../good-annotated type parameter.sdstest | 3 + .../functions/good-annotation call.sdstest | 4 + .../good-contravariant type parameter.sdstest | 3 + .../good-covariant type parameter.sdstest | 3 + .../good-empty constraint list.sdstest | 3 + .../good-empty type parameter list.sdstest | 3 + .../good-invariant type parameter.sdstest | 3 + .../good-multiple parameters.sdstest | 12 + .../functions/good-multiple results.sdstest | 8 + .../good-multiple type parameters.sdstest | 3 + .../good-no parameters and no results.sdstest | 3 + .../good-no results (explicit).sdstest | 3 + ...-one typed result (in parentheses).sdstest | 3 + ...-one typed result (no parentheses).sdstest | 3 + ...ne untyped result (no parentheses).sdstest | 3 + ... untyped result (with parentheses).sdstest | 3 + .../good-with multiple constraints.sdstest | 6 + .../good-with sub constraint.sdstest | 5 + .../good-with super constraint.sdstest | 5 + ...good-with typed optional parameter.sdstest | 3 + ...good-with typed required parameter.sdstest | 3 + ...dic parameter (with default value).sdstest | 3 + ...good-with typed variadic parameter.sdstest | 3 + ...od-with untyped optional parameter.sdstest | 3 + ...od-with untyped required parameter.sdstest | 3 + ...dic parameter (with default value).sdstest | 3 + ...od-with untyped variadic parameter.sdstest | 3 + .../grammar/declarations/pipeline.sdstest | 7 - .../pipelines/bad-missing body.sdstest | 3 + .../pipelines/bad-unclosed body.sdstest | 3 + .../pipelines/good-annotation call.sdstest | 4 + .../pipelines/good-empty body.sdstest | 3 + .../good-statements in body.sdstest} | 2 +- .../goals/goalsWithArguments.sdstest | 11 - .../declarations/predicates/predicate.sdstest | 4 - .../predicates/predicateComplex.sdstest | 5 - .../predicates/predicateWithGoals.sdstest | 16 - .../predicateWithSchemaEffects.sdstest | 6 - .../steps/bad-missing body.sdstest | 3 + .../steps/bad-missing parameter list.sdstest | 3 + .../steps/bad-unclosed body.sdstest | 3 + .../steps/bad-unclosed parameter list.sdstest | 3 + .../steps/good-annotation call.sdstest | 4 + .../steps/good-internal step.sdstest | 3 + .../steps/good-multiple parameters.sdstest | 12 + .../steps/good-multiple results.sdstest | 8 + ...ters and no results and empty body.sdstest | 3 + .../steps/good-no results (explicit).sdstest | 3 + ...-one typed result (in parentheses).sdstest | 3 + ...-one typed result (no parentheses).sdstest | 3 + ...ne untyped result (no parentheses).sdstest | 3 + ... untyped result (with parentheses).sdstest | 3 + .../steps/good-private step.sdstest | 3 + .../steps/good-statements in body.sdstest | 5 + .../good-step in compilation unit.sdstest | 12 - .../steps/good-step in package.sdstest | 14 - ...good-with typed optional parameter.sdstest | 3 + ...good-with typed required parameter.sdstest | 3 + ...dic parameter (with default value).sdstest | 3 + ...good-with typed variadic parameter.sdstest | 3 + ...od-with untyped optional parameter.sdstest | 3 + ...od-with untyped required parameter.sdstest | 3 + ...dic parameter (with default value).sdstest | 3 + ...od-with untyped variadic parameter.sdstest | 3 + ...ad-addition without left operator.sdstest} | 2 +- ...ad-addition without right operator.sdstest | 5 + ...bad-division without left operator.sdstest | 5 + ...ad-division without right operator.sdstest | 5 + ...ltiplication without left operator.sdstest | 5 + ...tiplication without right operator.sdstest | 5 + .../bad-negation without operator.sdstest | 5 + ...subtraction without right operator.sdstest | 5 + .../good-addition.sdstest | 5 + .../good-complex example.sdstest} | 6 - .../good-division.sdstest | 5 + .../good-multiplication.sdstest | 5 + .../good-negation.sdstest | 5 + .../good-subtraction.sdstest | 5 + .../block lambdas/bad-unclosed body.sdstest | 5 + .../bad-unclosed parameter list.sdstest | 5 + .../good-filled body.sdstest} | 4 +- .../good-multiple parameters.sdstest | 14 + .../good-no parameters and empty body.sdstest | 5 + ...good-with typed optional parameter.sdstest | 5 + ...good-with typed required parameter.sdstest | 5 + ...dic parameter (with default value).sdstest | 5 + ...good-with typed variadic parameter.sdstest | 5 + ...od-with untyped optional parameter.sdstest | 5 + ...od-with untyped required parameter.sdstest | 5 + ...dic parameter (with default value).sdstest | 5 + ...od-with untyped variadic parameter.sdstest | 5 + .../calls/bad-unclosed argument list.sdstest | 5 + .../bad-unclosed type argument list.sdstest | 5 + .../good-complex call.sdstest} | 1 - .../good-contravariant type argument.sdstest | 5 + .../good-covariant type argument.sdstest | 5 + ...ype argument list and no arguments.sdstest | 5 + .../calls/good-named argument.sdstest | 5 + .../calls/good-named type argument.sdstest | 5 + ...gument lists (named type argument).sdstest | 5 + ...ype argument list and no arguments.sdstest | 5 + .../calls/good-positional argument.sdstest | 5 + .../good-positional type argument.sdstest | 5 + .../calls/good-star projection.sdstest | 5 + ...t lists (positional type argument).sdstest | 21 + ...han or equal without left operator.sdstest | 5 + ...an or equal without right operator.sdstest | 5 + ...greater than without left operator.sdstest | 5 + ...reater than without right operator.sdstest | 5 + ...han or equal without left operator.sdstest | 5 + ...an or equal without right operator.sdstest | 5 + ...ad-less than without left operator.sdstest | 5 + ...d-less than without right operator.sdstest | 5 + .../good-greater than or equal.sdstest | 5 + .../good-greater than.sdstest | 5 + .../good-less than or equal.sdstest | 5 + ...d-less than vs. type argument list.sdstest | 6 + .../good-less than.sdstest | 5 + .../expressions/comparisonOperator.sdstest | 12 - .../bad-equal without left operator.sdstest | 5 + .../bad-equal without right operator.sdstest | 5 + ...ad-identical without left operator.sdstest | 5 + ...d-identical without right operator.sdstest | 5 + ...ad-not equal without left operator.sdstest | 5 + ...d-not equal without right operator.sdstest | 5 + ...ot identical without left operator.sdstest | 5 + ...t identical without right operator.sdstest | 5 + .../equality operators/good-equal.sdstest | 5 + .../equality operators/good-identical.sdstest | 5 + .../equality operators/good-not equal.sdstest | 5 + .../good-not identical.sdstest | 5 + .../bad-missing body.sdstest | 5 + .../bad-unclosed parameter list.sdstest | 7 + .../good-multiple parameters.sdstest | 14 + .../good-no parameters.sdstest} | 2 - .../good-typed optional parameter.sdstest | 5 + .../good-typed required parameter.sdstest | 5 + ...dic parameter (with default value).sdstest | 5 + .../good-typed variadic parameter.sdstest | 5 + .../good-untyped optional parameter.sdstest | 5 + .../good-untyped required parameter.sdstest | 5 + ...dic parameter (with default value).sdstest | 5 + .../good-untyped variadic parameter.sdstest | 5 + ...> good-complex chained expression.sdstest} | 0 ...ference.sdstest => good-reference.sdstest} | 0 .../bad-no index.sdstest} | 0 .../indexed accesses/bad-no receiver.sdstest | 5 + .../bad-unclosed square bracket.sdstest | 5 + .../good-literal index.sdstest} | 1 - .../good-reference index.sdstest | 5 + .../float/bad-no digits before dot.sdstest | 5 + .../good-basic example.sdstest} | 1 - ...ientific notation with lowercase e.sdstest | 8 + ...ientific notation with uppercase e.sdstest | 8 + ...leanLiteral.sdstest => good-false.sdstest} | 1 - ...{nullLiteral.sdstest => good-null.sdstest} | 0 .../expressions/literals/good-true.sdstest | 5 + .../literals/int/good-leading zero.sdstest | 5 + .../literals/int/good-multiple digits.sdstest | 5 + .../literals/int/good-one digit.sdstest | 5 + .../bad-single quotes as delimiters.sdstest | 5 + ...ate string with invalid expression.sdstest | 5 + .../string/bad-unclosed quote.sdstest | 5 + .../bad-unclosed template expression.sdstest | 5 + .../string/good-basic content.sdstest | 5 + ...sing template expression delimiter.sdstest | 5 + ...od-curly braces separated by space.sdstest | 5 + .../good-empty template expression.sdstest | 5 + .../literals/string/good-empty.sdstest | 5 + .../string/good-escaped curly brace.sdstest | 5 + .../string/good-multiple lines.sdstest | 9 + .../good-newline escape sequence.sdstest | 5 + .../string/good-single curly brace.sdstest | 5 + .../literals/string/good-single quote.sdstest | 5 + ...plate string with basic expression.sdstest | 5 + .../good-unicode escape sequence.sdstest | 5 + .../literals/stringLiteral.sdstest | 19 - ...-conjunction without left operator.sdstest | 5 + ...conjunction without right operator.sdstest | 5 + ...-disjunction without left operator.sdstest | 5 + ...disjunction without right operator.sdstest | 5 + .../bad-negation without operator.sdstest | 5 + .../good-complex example.sdstest} | 4 - .../good-conjunction.sdstest | 5 + .../good-disjunction.sdstest | 5 + .../logical operations/good-negation.sdstest | 5 + .../member accesses/bad-no receiver.sdstest | 5 + .../member accesses/good-not nullable.sdstest | 5 + .../good-nullable.sdstest} | 1 - .../bad-unclosed parenthesis.sdstest | 5 + .../good-nested.sdstest | 5 + .../good-one level.sdstest} | 0 .../bad-unescaped _.sdstest} | 0 .../bad-unescaped and.sdstest} | 0 .../bad-unescaped annotation.sdstest} | 0 .../bad-unescaped as.sdstest} | 0 .../bad-unescaped attr.sdstest} | 0 .../bad-unescaped class.sdstest} | 0 .../bad-unescaped enum.sdstest} | 0 .../bad-unescaped false.sdstest} | 0 .../bad-unescaped fun.sdstest} | 0 .../bad-unescaped import.sdstest} | 0 .../bad-unescaped in.sdstest} | 0 .../bad-unescaped internal.sdstest | 3 + .../bad-unescaped not.sdstest} | 0 .../bad-unescaped null.sdstest} | 0 .../bad-unescaped or.sdstest} | 0 .../bad-unescaped out.sdstest} | 0 .../bad-unescaped package.sdstest} | 0 .../bad-unescaped pipeline.sdstest} | 0 .../bad-unescaped private.sdstest | 3 + .../bad-unescaped protocol.sdstest | 3 + .../bad-unescaped schema.sdstest} | 2 +- .../bad-unescaped static.sdstest} | 0 .../bad-unescaped step.sdstest} | 0 .../bad-unescaped sub.sdstest} | 0 .../bad-unescaped subterm.sdstest | 3 + .../bad-unescaped super.sdstest} | 0 .../bad-unescaped true.sdstest} | 0 .../bad-unescaped union.sdstest} | 0 .../bad-unescaped val.sdstest} | 0 .../bad-unescaped vararg.sdstest} | 0 .../bad-unescaped where.sdstest} | 2 +- .../bad-unescaped yield.sdstest} | 0 .../good-escapedKeywords.sdstest | 7 +- .../good-escapedNonKeyword.sdstest | 0 ...-annotation call after declaration.sdstest | 5 + .../bad-annotation call after import.sdstest | 5 + ...annotation call after package name.sdstest | 5 + ...l between package name and import.sdstest} | 4 +- .../bad-duplicate package name.sdstest} | 0 .../bad-import after declaration.sdstest | 5 + ...bad-package name after declaration.sdstest | 5 + .../bad-package name after import.sdstest} | 0 ...od-annotation call and declaration.sdstest | 5 + ...on call and import and declaration.sdstest | 7 + .../good-annotation call and import.sdstest} | 2 +- ...l and package name and declaration.sdstest | 7 + ...ge name and import and declaration.sdstest | 9 + ...n call and package name and import.sdstest | 7 + ...-annotation call and package name.sdstest} | 2 +- .../modules/good-annotation call.sdstest | 3 + ...-annotation calls and declarations.sdstest | 7 + ...calls and imports and declarations.sdstest | 11 + .../good-annotation calls and imports.sdstest | 8 + ... and package name and declarations.sdstest | 9 + ... name and imports and declarations.sdstest | 13 + ...alls and package name and imports.sdstest} | 5 +- ...-annotation calls and package name.sdstest | 6 + .../modules/good-annotation calls.sdstest | 4 + .../grammar/modules/good-declaration.sdstest | 3 + .../grammar/modules/good-declarations.sdstest | 4 + .../good-empty.sdstest | 0 .../good-import and declaration.sdstest | 5 + .../grammar/modules/good-import.sdstest | 3 + .../good-imports and declarations.sdstest | 8 + .../good-imports.sdstest} | 0 .../good-package name and declaration.sdstest | 5 + ...good-package name and declarations.sdstest | 6 + ...ge name and import and declaration.sdstest | 7 + .../good-package name and import.sdstest | 5 + ... name and imports and declarations.sdstest | 10 + .../good-package name and imports.sdstest | 7 + .../good-package name.sdstest} | 0 .../schema/bad-no name (colon).sdstest | 5 + .../schema/bad-no name (no colon)sdstest | 5 + .../schema/bad-no type (colon).sdstest | 5 + .../schema/bad-no type (no colon).sdstest | 5 + .../schema/bad-switched name and type.sdstest | 5 + .../schema/bad-unclosed curly brace.sdstest | 3 + .../grammar/schema/good-empty schema.sdstest | 3 + ...hema.sdsschema => good-one column.sdstest} | 2 +- .../grammar/schema/good-two columns.sdstest | 6 + ...-in block lambda without assignees.sdstest | 7 + ...in block lambda without expression.sdstest | 7 + ...-in block lambda without semicolon.sdstest | 7 + .../bad-in pipeline without assignees.sdstest | 5 + ...bad-in pipeline without expression.sdstest | 5 + .../bad-in pipeline without semicolon.sdstest | 5 + .../bad-in step without assignees.sdstest | 5 + .../bad-in step without expression.sdstest | 5 + .../bad-in step without semicolon.sdstest | 5 + .../good-in block lambda.sdstest} | 3 - .../assignments/good-in pipeline.sdstest | 6 + .../assignments/good-in step.sdstest | 6 + ...ad-empty statement in block lambda.sdstest | 7 + .../bad-empty statement in pipeline.sdstest | 5 + .../bad-empty statement in step.sdstest | 5 + ...-in block lambda without semicolon.sdstest | 7 + .../bad-in pipeline without semicolon.sdstest | 5 + .../bad-in step without semicolon.sdstest | 5 + .../good-in block lambda.sdstest} | 2 - .../good-in pipeline.sdstest | 5 + .../good-in step.sdstest | 5 + ...d-argument list of annotation call.sdstest | 3 + .../good-argument list of call.sdstest} | 2 - ...ist of assignment in block lambda.sdstest} | 4 - .../good-assignee list of assignment.sdstest | 5 + .../good-column list of schema.sdstest} | 3 +- ...good-constraint list of annotation.sdstest | 6 + .../good-constraint list of class.sdstest | 6 + ...od-constraint list of enum variant.sdstest | 8 + .../good-constraint list of function.sdstest | 6 + ...good-parameter list of annotation.sdstest} | 2 - ...od-parameter list of block lambda.sdstest} | 2 - ...d-parameter list of callable type.sdstest} | 2 - .../good-parameter list of class.sdstest} | 2 - ...od-parameter list of enum variant.sdstest} | 2 - ...rameter list of expression lambda.sdstest} | 2 - .../good-parameter list of function.sdstest} | 2 - .../good-parameter list of step.sdstest | 6 + .../good-parent type list of class.sdstest | 3 + ...good-result list of callable type.sdstest} | 2 - .../good-result list of function.sdstest | 6 + .../good-result list of step.sdstest | 6 + .../good-type argument list of call.sdstest} | 2 - ...-type argument list of named type.sdstest} | 2 +- ...d-type argument list of union type.sdstest | 5 + .../good-type parameter list of class.sdstest | 3 + ...ype parameter list of enum variant.sdstest | 5 + ...od-type parameter list of function.sdstest | 3 + .../inAnnotationUse_ArgumentList.sdstest | 5 - .../inAnnotation_ConstraintList.sdstest | 8 - .../inClass_ConstraintList.sdstest | 10 - .../inClass_SuperTypeList.sdstest | 5 - .../inClass_TypeParameterList.sdstest | 5 - .../inEnumVariant_ConstraintList.sdstest | 7 - .../inEnumVariant_TypeParameterList.sdstest | 10 - .../inFunction_ResultList.sdstest | 8 - ...nction_TypeParameterConstraintList.sdstest | 10 - .../inFunction_TypeParameterList.sdstest | 5 - .../inNamedType_TypeArgumentList.sdstest | 7 - .../inWorkflowStep_ParameterList.sdstest | 4 - .../bad-with missing arrow.sdstest | 5 + .../bad-with missing parameter list.sdstest | 5 + .../bad-with missing result list.sdstest | 5 + .../good-with multiple parameters.sdstest | 14 + .../good-with multiple results.sdstest | 10 + .../good-with one typed parameter.sdstest | 5 + ... one typed result (in parentheses).sdstest | 5 + ... one typed result (no parentheses).sdstest | 5 + .../good-with one untyped parameter.sdstest | 5 + ...ne untyped result (in parentheses).sdstest | 5 + ...ne untyped result (no parentheses).sdstest | 5 + ...good-without parameters or results.sdstest | 5 + .../grammar/types/callableType.sdstest | 13 - .../bad-callable type as member.sdstest | 5 + .../member types/bad-missing member.sdstest | 5 + .../member types/bad-missing receiver.sdstest | 5 + .../bad-unclosed angle bracket.sdstest | 5 + .../bad-union type as member.sdstest | 5 + .../good-long complex chain.sdstest | 5 + ...allable) and member (not nullable).sdstest | 5 + ...r (callable) and member (nullable).sdstest | 5 + ...ullable) and member (not nullable).sdstest | 5 + ...ot nullable) and member (nullable).sdstest | 5 + ...ullable) and member (not nullable).sdstest | 5 + ...d, nullable) and member (nullable).sdstest | 5 + ... (union) and member (not nullable).sdstest | 5 + ...iver (union) and member (nullable).sdstest | 5 + .../grammar/types/memberType.sdstest | 9 - .../bad-unclosed angle bracket.sdstest | 5 + ...no type arguments and not nullable.sdstest | 5 + ...ood-no type arguments and nullable.sdstest | 5 + .../good-type argument and nullable.sdstest | 5 + ...od-type arguments and not nullable.sdstest | 5 + .../resources/grammar/types/namedType.sdstest | 9 - .../bad-unclosed angle bracket.sdstest | 5 + .../types/union types/good-empty.sdstest | 5 + .../types/union types/good-nested.sdstest | 5 + .../good-with type arguments.sdstest | 5 + .../resources/grammar/types/unionType.sdstest | 9 - .../nested/not a safe-ds file.txt} | 0 .../nested/pipeline file.sdspipe | 0 .../nested/skip pipeline file.sdspipe | 0 .../nested/skip stub file.sdsstub | 0 .../nested/skip test file.sdstest | 0 .../nested/stub file.sdsstub | 0 .../nested/test file.sdstest | 0 .../listTestResources/not a safe-ds file.txt | 0 .../listTestResources/pipeline file.sdspipe | 0 .../skip pipeline file.sdspipe | 0 .../listTestResources/skip stub file.sdsstub | 0 .../listTestResources/skip test file.sdstest | 0 .../listTestResources/stub file.sdsstub | 0 .../listTestResources/test file.sdstest | 0 DSL-langium/vitest.config.ts | 9 + DSL/langium/SafeDS-types.langium | 428 ----- DSL/langium/SafeDS.langium | 493 ------ docs/development/dsl-development-checklist.md | 6 +- docs/development/grammar-testing.md | 38 + docs/language/common/types.md | 9 - mkdocs.yml | 1 + 597 files changed, 4738 insertions(+), 2086 deletions(-) delete mode 100644 DSL-langium/syntaxes/safe-ds.tmLanguage.json delete mode 100644 DSL-langium/tests/grammar/IssueFinderTest.kt create mode 100644 DSL-langium/tests/grammar/testGrammar.test.ts delete mode 100644 DSL-langium/tests/resources/grammar/compilationUnits/good-complex example.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotation calls/bad-unclosed argument list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotation calls/good-empty argument list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotation calls/good-multiple arguments.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotation calls/good-named argument.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotation calls/good-no argument list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotation calls/good-positional argument.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/declarations/annotation.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/declarations/annotationUse.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/bad-unclosed constraint list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/bad-unclosed parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-annotation call.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-empty parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-multiple parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-no parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-with multiple constraints.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-with sub constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-with super constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped variadic parameter.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/declarations/class.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-annotated.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-no type.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-static.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-with type.sdstest rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedConstraint.sdstest => declarations/classes/bad-empty parent type list.sdstest} (57%) rename DSL-langium/tests/resources/grammar/{parserShouldNotCrashOnSyntaxErrors/unclosedEnum.sdstest => declarations/classes/bad-unclosed body.sdstest} (60%) create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed constraint list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed type parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-annotated type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-annotation call.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-contravariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-covariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-empty body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-empty constraint list.sdstest rename DSL-langium/tests/resources/grammar/{compilationUnits/good-lone annotation call.sdstest => declarations/classes/good-empty parameter list.sdstest} (62%) create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-empty type parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-invariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-minimal.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-multiple parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-multiple parent types.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-multiple type parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-one parent type.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-with multiple constraints.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-with sub constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-with super constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-with typed optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-with typed required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-with typed variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-with typed variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-missing parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-unclosed constraint list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-unclosed parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-unclosed type parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-annotated type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-annotation call.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-contravariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-covariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-empty constraint list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-empty type parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-invariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-multiple parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-multiple results.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-multiple type parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-no parameters and no results.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-no results (explicit).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one typed result (in parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one typed result (no parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one untyped result (no parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one untyped result (with parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-static.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with multiple constraints.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with sub constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with super constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-empty parent type list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed constraint list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed type parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-annotated type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-annotation call.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-contravariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-covariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty constraint list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty type parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-invariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-minimal.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-multiple parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-multiple parent types.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-multiple type parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-parent type.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with multiple constraints.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with sub constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with super constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/bad-unclosed body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-annotation call.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-empty body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-no body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-variants in body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/bad-unclosed constraint list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/bad-unclosed parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/bad-unclosed type parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-annotated type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-annotation call.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-contravariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-covariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-empty type parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-invariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-multiple parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-multiple type parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-no parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with multiple constraints.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with sub constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with super constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped variadic parameter.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/declarations/enum.sdstest rename DSL-langium/tests/resources/grammar/{parserShouldNotCrashOnSyntaxErrors/unclosedTypeParameterList.sdstest => declarations/enums/bad-unclosed body.sdstest} (63%) create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/good-annotation call.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/good-empty body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/good-no body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/good-variants in body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/bad-unclosed constraint list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/bad-unclosed parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/bad-unclosed type parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-annotated type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-annotation call.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-contravariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-covariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-empty type parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-invariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-multiple parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-multiple type parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-no parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with multiple constraints.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with sub constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with super constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped variadic parameter.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/declarations/function.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/bad-missing parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/bad-unclosed constraint list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/bad-unclosed parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/bad-unclosed type parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-annotated type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-annotation call.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-contravariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-covariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-empty constraint list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-empty type parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-invariant type parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-multiple parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-multiple results.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-multiple type parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-no parameters and no results.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-no results (explicit).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-one typed result (in parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-one typed result (no parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-one untyped result (no parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-one untyped result (with parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-with multiple constraints.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-with sub constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-with super constraint.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-with typed optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-with typed required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-with typed variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-with typed variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped variadic parameter.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/declarations/pipeline.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/pipelines/bad-missing body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/pipelines/bad-unclosed body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/pipelines/good-annotation call.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/pipelines/good-empty body.sdstest rename DSL-langium/tests/resources/grammar/{expressions/templateString_good.sdstest => declarations/pipelines/good-statements in body.sdstest} (65%) delete mode 100644 DSL-langium/tests/resources/grammar/declarations/predicates/goals/goalsWithArguments.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/declarations/predicates/predicate.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/declarations/predicates/predicateComplex.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/declarations/predicates/predicateWithGoals.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/declarations/predicates/predicateWithSchemaEffects.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/bad-missing body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/bad-missing parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/bad-unclosed body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/bad-unclosed parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-annotation call.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-internal step.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-multiple parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-multiple results.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-no parameters and no results and empty body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-no results (explicit).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-one typed result (in parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-one typed result (no parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-one untyped result (no parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-one untyped result (with parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-private step.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-statements in body.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-step in compilation unit.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-step in package.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-with typed optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-with typed required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-with typed variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-with typed variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped variadic parameter.sdstest rename DSL-langium/tests/resources/grammar/expressions/{templateString_bad.sdstest => arithmetic operators/bad-addition without left operator.sdstest} (62%) create mode 100644 DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-addition without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-division without left operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-division without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-multiplication without left operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-multiplication without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-negation without operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-subtraction without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-addition.sdstest rename DSL-langium/tests/resources/grammar/expressions/{arithmeticOperator.sdstest => arithmetic operators/good-complex example.sdstest} (61%) create mode 100644 DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-division.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-multiplication.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-negation.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-subtraction.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/block lambdas/bad-unclosed body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/block lambdas/bad-unclosed parameter list.sdstest rename DSL-langium/tests/resources/grammar/expressions/{blockLambda.sdstest => block lambdas/good-filled body.sdstest} (68%) create mode 100644 DSL-langium/tests/resources/grammar/expressions/block lambdas/good-multiple parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/block lambdas/good-no parameters and empty body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/bad-unclosed argument list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/bad-unclosed type argument list.sdstest rename DSL-langium/tests/resources/grammar/expressions/{call.sdstest => calls/good-complex call.sdstest} (92%) create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/good-contravariant type argument.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/good-covariant type argument.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/good-empty type argument list and no arguments.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/good-named argument.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/good-named type argument.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/good-nested type argument lists (named type argument).sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/good-no type argument list and no arguments.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/good-positional argument.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/good-positional type argument.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/good-star projection.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/calls/skip-nested type argument lists (positional type argument).sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than or equal without left operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than or equal without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than without left operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than or equal without left operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than or equal without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than without left operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/good-greater than or equal.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/good-greater than.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/good-less than or equal.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/good-less than vs. type argument list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/comparison operators/good-less than.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/expressions/comparisonOperator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/equality operators/bad-equal without left operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/equality operators/bad-equal without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/equality operators/bad-identical without left operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/equality operators/bad-identical without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not equal without left operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not equal without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not identical without left operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not identical without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/equality operators/good-equal.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/equality operators/good-identical.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/equality operators/good-not equal.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/equality operators/good-not identical.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/expression lambdas/bad-missing body.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/expression lambdas/bad-unclosed parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-multiple parameters.sdstest rename DSL-langium/tests/resources/grammar/expressions/{expressionLambda.sdstest => expression lambdas/good-no parameters.sdstest} (68%) create mode 100644 DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed variadic parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped optional parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped required parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped variadic parameter (with default value).sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped variadic parameter.sdstest rename DSL-langium/tests/resources/grammar/expressions/{chainedExpression.sdstest => good-complex chained expression.sdstest} (100%) rename DSL-langium/tests/resources/grammar/expressions/{reference.sdstest => good-reference.sdstest} (100%) rename DSL-langium/tests/resources/grammar/expressions/{indexedAccess/bad-indexed access without index.sdstest => indexed accesses/bad-no index.sdstest} (100%) create mode 100644 DSL-langium/tests/resources/grammar/expressions/indexed accesses/bad-no receiver.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/indexed accesses/bad-unclosed square bracket.sdstest rename DSL-langium/tests/resources/grammar/expressions/{indexedAccess/good-indexed access.sdstest => indexed accesses/good-literal index.sdstest} (84%) create mode 100644 DSL-langium/tests/resources/grammar/expressions/indexed accesses/good-reference index.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/float/bad-no digits before dot.sdstest rename DSL-langium/tests/resources/grammar/expressions/literals/{numberLiteral.sdstest => float/good-basic example.sdstest} (95%) create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/float/good-scientific notation with lowercase e.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/float/good-scientific notation with uppercase e.sdstest rename DSL-langium/tests/resources/grammar/expressions/literals/{booleanLiteral.sdstest => good-false.sdstest} (86%) rename DSL-langium/tests/resources/grammar/expressions/literals/{nullLiteral.sdstest => good-null.sdstest} (100%) create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/good-true.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/int/good-leading zero.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/int/good-multiple digits.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/int/good-one digit.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/bad-single quotes as delimiters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/bad-template string with invalid expression.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/bad-unclosed quote.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/bad-unclosed template expression.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/good-basic content.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/good-closing template expression delimiter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/good-curly braces separated by space.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/good-empty template expression.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/good-empty.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/good-escaped curly brace.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/good-multiple lines.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/good-newline escape sequence.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/good-single curly brace.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/good-single quote.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/good-template string with basic expression.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/string/good-unicode escape sequence.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/expressions/literals/stringLiteral.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/logical operations/bad-conjunction without left operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/logical operations/bad-conjunction without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/logical operations/bad-disjunction without left operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/logical operations/bad-disjunction without right operator.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/logical operations/bad-negation without operator.sdstest rename DSL-langium/tests/resources/grammar/expressions/{logicalOperator.sdstest => logical operations/good-complex example.sdstest} (61%) create mode 100644 DSL-langium/tests/resources/grammar/expressions/logical operations/good-conjunction.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/logical operations/good-disjunction.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/logical operations/good-negation.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/member accesses/bad-no receiver.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/member accesses/good-not nullable.sdstest rename DSL-langium/tests/resources/grammar/expressions/{memberAccess.sdstest => member accesses/good-nullable.sdstest} (82%) create mode 100644 DSL-langium/tests/resources/grammar/expressions/parenthesized expressions/bad-unclosed parenthesis.sdstest create mode 100644 DSL-langium/tests/resources/grammar/expressions/parenthesized expressions/good-nested.sdstest rename DSL-langium/tests/resources/grammar/expressions/{parenthesizedExpression.sdstest => parenthesized expressions/good-one level.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescaped_.sdstest => keywords as names/bad-unescaped _.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedAnd.sdstest => keywords as names/bad-unescaped and.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedAnnotation.sdstest => keywords as names/bad-unescaped annotation.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedAs.sdstest => keywords as names/bad-unescaped as.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedAttr.sdstest => keywords as names/bad-unescaped attr.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedClass.sdstest => keywords as names/bad-unescaped class.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedEnum.sdstest => keywords as names/bad-unescaped enum.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedFalse.sdstest => keywords as names/bad-unescaped false.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedFun.sdstest => keywords as names/bad-unescaped fun.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedImport.sdstest => keywords as names/bad-unescaped import.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedIn.sdstest => keywords as names/bad-unescaped in.sdstest} (100%) create mode 100644 DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped internal.sdstest rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedNot.sdstest => keywords as names/bad-unescaped not.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedNull.sdstest => keywords as names/bad-unescaped null.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedOr.sdstest => keywords as names/bad-unescaped or.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedOut.sdstest => keywords as names/bad-unescaped out.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedPackage.sdstest => keywords as names/bad-unescaped package.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedWorkflow.sdstest => keywords as names/bad-unescaped pipeline.sdstest} (100%) create mode 100644 DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped private.sdstest create mode 100644 DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped protocol.sdstest rename DSL-langium/tests/resources/grammar/{parserShouldNotCrashOnSyntaxErrors/unclosedResultList.sdstest => keywords as names/bad-unescaped schema.sdstest} (64%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedStatic.sdstest => keywords as names/bad-unescaped static.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedStep.sdstest => keywords as names/bad-unescaped step.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedSub.sdstest => keywords as names/bad-unescaped sub.sdstest} (100%) create mode 100644 DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped subterm.sdstest rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedSuper.sdstest => keywords as names/bad-unescaped super.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedTrue.sdstest => keywords as names/bad-unescaped true.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedUnion.sdstest => keywords as names/bad-unescaped union.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedVal.sdstest => keywords as names/bad-unescaped val.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedVararg.sdstest => keywords as names/bad-unescaped vararg.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{parserShouldNotCrashOnSyntaxErrors/unclosedParameterList.sdstest => keywords as names/bad-unescaped where.sdstest} (66%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames/bad-unescapedYield.sdstest => keywords as names/bad-unescaped yield.sdstest} (100%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames => keywords as names}/good-escapedKeywords.sdstest (79%) rename DSL-langium/tests/resources/grammar/{keywordsAsNames => keywords as names}/good-escapedNonKeyword.sdstest (100%) create mode 100644 DSL-langium/tests/resources/grammar/modules/bad-annotation call after declaration.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/bad-annotation call after import.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/bad-annotation call after package name.sdstest rename DSL-langium/tests/resources/grammar/{compilationUnits/bad-annotation between package and import.sdstest => modules/bad-annotation call between package name and import.sdstest} (50%) rename DSL-langium/tests/resources/grammar/{compilationUnits/bad-duplicate package.sdstest => modules/bad-duplicate package name.sdstest} (100%) create mode 100644 DSL-langium/tests/resources/grammar/modules/bad-import after declaration.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/bad-package name after declaration.sdstest rename DSL-langium/tests/resources/grammar/{compilationUnits/bad-import before package.sdstest => modules/bad-package name after import.sdstest} (100%) create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation call and declaration.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation call and import and declaration.sdstest rename DSL-langium/tests/resources/grammar/{declarations/package/good-annotationUsesWithImports.sdstest => modules/good-annotation call and import.sdstest} (77%) create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation call and package name and declaration.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation call and package name and import and declaration.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation call and package name and import.sdstest rename DSL-langium/tests/resources/grammar/{declarations/package/good-annotationUsesWithName.sdstest => modules/good-annotation call and package name.sdstest} (75%) create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation call.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation calls and declarations.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation calls and imports and declarations.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation calls and imports.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name and declarations.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name and imports and declarations.sdstest rename DSL-langium/tests/resources/grammar/{declarations/package/good-full.sdstest => modules/good-annotation calls and package name and imports.sdstest} (80%) create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-annotation calls.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-declaration.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-declarations.sdstest rename DSL-langium/tests/resources/grammar/{compilationUnits => modules}/good-empty.sdstest (100%) create mode 100644 DSL-langium/tests/resources/grammar/modules/good-import and declaration.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-import.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-imports and declarations.sdstest rename DSL-langium/tests/resources/grammar/{declarations/package/good-importsOnly.sdstest => modules/good-imports.sdstest} (100%) create mode 100644 DSL-langium/tests/resources/grammar/modules/good-package name and declaration.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-package name and declarations.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-package name and import and declaration.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-package name and import.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-package name and imports and declarations.sdstest create mode 100644 DSL-langium/tests/resources/grammar/modules/good-package name and imports.sdstest rename DSL-langium/tests/resources/grammar/{declarations/package/good-nameOnly.sdstest => modules/good-package name.sdstest} (100%) create mode 100644 DSL-langium/tests/resources/grammar/schema/bad-no name (colon).sdstest create mode 100644 DSL-langium/tests/resources/grammar/schema/bad-no name (no colon)sdstest create mode 100644 DSL-langium/tests/resources/grammar/schema/bad-no type (colon).sdstest create mode 100644 DSL-langium/tests/resources/grammar/schema/bad-no type (no colon).sdstest create mode 100644 DSL-langium/tests/resources/grammar/schema/bad-switched name and type.sdstest create mode 100644 DSL-langium/tests/resources/grammar/schema/bad-unclosed curly brace.sdstest create mode 100644 DSL-langium/tests/resources/grammar/schema/good-empty schema.sdstest rename DSL-langium/tests/resources/grammar/schema/{schema.sdsschema => good-one column.sdstest} (60%) create mode 100644 DSL-langium/tests/resources/grammar/schema/good-two columns.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/assignments/bad-in block lambda without assignees.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/assignments/bad-in block lambda without expression.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/assignments/bad-in block lambda without semicolon.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/assignments/bad-in pipeline without assignees.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/assignments/bad-in pipeline without expression.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/assignments/bad-in pipeline without semicolon.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/assignments/bad-in step without assignees.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/assignments/bad-in step without expression.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/assignments/bad-in step without semicolon.sdstest rename DSL-langium/tests/resources/grammar/statements/{assignment.sdstest => assignments/good-in block lambda.sdstest} (71%) create mode 100644 DSL-langium/tests/resources/grammar/statements/assignments/good-in pipeline.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/assignments/good-in step.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/bad-empty statement in block lambda.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/bad-empty statement in pipeline.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/bad-empty statement in step.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/expression statements/bad-in block lambda without semicolon.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/expression statements/bad-in pipeline without semicolon.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/expression statements/bad-in step without semicolon.sdstest rename DSL-langium/tests/resources/grammar/statements/{expressionStatement.sdstest => expression statements/good-in block lambda.sdstest} (86%) create mode 100644 DSL-langium/tests/resources/grammar/statements/expression statements/good-in pipeline.sdstest create mode 100644 DSL-langium/tests/resources/grammar/statements/expression statements/good-in step.sdstest create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-argument list of annotation call.sdstest rename DSL-langium/tests/resources/grammar/{trailingCommas/inCall_ArgumentList.sdstest => trailing commas/good-argument list of call.sdstest} (54%) rename DSL-langium/tests/resources/grammar/{trailingCommas/inAssignment_AssigneeList.sdstest => trailing commas/good-assignee list of assignment in block lambda.sdstest} (51%) create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-assignee list of assignment.sdstest rename DSL-langium/tests/resources/grammar/{trailingCommas/inSchema_ColumnList.sdsschema => trailing commas/good-column list of schema.sdstest} (58%) create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of annotation.sdstest create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of class.sdstest create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of enum variant.sdstest create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of function.sdstest rename DSL-langium/tests/resources/grammar/{trailingCommas/inAnnotation_ParameterList.sdstest => trailing commas/good-parameter list of annotation.sdstest} (54%) rename DSL-langium/tests/resources/grammar/{trailingCommas/inBlockLambda_ParameterList.sdstest => trailing commas/good-parameter list of block lambda.sdstest} (54%) rename DSL-langium/tests/resources/grammar/{trailingCommas/inFunctionType_ParameterList.sdstest => trailing commas/good-parameter list of callable type.sdstest} (55%) rename DSL-langium/tests/resources/grammar/{trailingCommas/inClass_ParameterList.sdstest => trailing commas/good-parameter list of class.sdstest} (51%) rename DSL-langium/tests/resources/grammar/{trailingCommas/inEnumVariant_ParameterList.sdstest => trailing commas/good-parameter list of enum variant.sdstest} (59%) rename DSL-langium/tests/resources/grammar/{trailingCommas/inExpressionLambda_ParameterList.sdstest => trailing commas/good-parameter list of expression lambda.sdstest} (53%) rename DSL-langium/tests/resources/grammar/{trailingCommas/inFunction_ParameterList.sdstest => trailing commas/good-parameter list of function.sdstest} (53%) create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of step.sdstest create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-parent type list of class.sdstest rename DSL-langium/tests/resources/grammar/{trailingCommas/inFunctionType_ResultList.sdstest => trailing commas/good-result list of callable type.sdstest} (57%) create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-result list of function.sdstest create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-result list of step.sdstest rename DSL-langium/tests/resources/grammar/{trailingCommas/inCall_TypeArgumentList.sdstest => trailing commas/good-type argument list of call.sdstest} (54%) rename DSL-langium/tests/resources/grammar/{types/parenthesizedType.sdstest => trailing commas/good-type argument list of named type.sdstest} (62%) create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-type argument list of union type.sdstest create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-type parameter list of class.sdstest create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-type parameter list of enum variant.sdstest create mode 100644 DSL-langium/tests/resources/grammar/trailing commas/good-type parameter list of function.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/trailingCommas/inAnnotationUse_ArgumentList.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/trailingCommas/inAnnotation_ConstraintList.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/trailingCommas/inClass_ConstraintList.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/trailingCommas/inClass_SuperTypeList.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/trailingCommas/inClass_TypeParameterList.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/trailingCommas/inEnumVariant_ConstraintList.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/trailingCommas/inEnumVariant_TypeParameterList.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/trailingCommas/inFunction_ResultList.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/trailingCommas/inFunction_TypeParameterConstraintList.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/trailingCommas/inFunction_TypeParameterList.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/trailingCommas/inNamedType_TypeArgumentList.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/trailingCommas/inWorkflowStep_ParameterList.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/callable types/bad-with missing arrow.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/callable types/bad-with missing parameter list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/callable types/bad-with missing result list.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/callable types/good-with multiple parameters.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/callable types/good-with multiple results.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/callable types/good-with one typed parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/callable types/good-with one typed result (in parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/callable types/good-with one typed result (no parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/callable types/good-with one untyped parameter.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/callable types/good-with one untyped result (in parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/callable types/good-with one untyped result (no parentheses).sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/callable types/good-without parameters or results.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/types/callableType.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/bad-callable type as member.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/bad-missing member.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/bad-missing receiver.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/bad-unclosed angle bracket.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/bad-union type as member.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/good-long complex chain.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/good-receiver (callable) and member (not nullable).sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/good-receiver (callable) and member (nullable).sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, not nullable) and member (not nullable).sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, not nullable) and member (nullable).sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, nullable) and member (not nullable).sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, nullable) and member (nullable).sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/good-receiver (union) and member (not nullable).sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/member types/good-receiver (union) and member (nullable).sdstest delete mode 100644 DSL-langium/tests/resources/grammar/types/memberType.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/named types/bad-unclosed angle bracket.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/named types/good-no type arguments and not nullable.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/named types/good-no type arguments and nullable.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/named types/good-type argument and nullable.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/named types/good-type arguments and not nullable.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/types/namedType.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/union types/bad-unclosed angle bracket.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/union types/good-empty.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/union types/good-nested.sdstest create mode 100644 DSL-langium/tests/resources/grammar/types/union types/good-with type arguments.sdstest delete mode 100644 DSL-langium/tests/resources/grammar/types/unionType.sdstest rename DSL-langium/tests/resources/{grammar/compilationUnits/bad-import before declaration => helpers/listTestResources/nested/not a safe-ds file.txt} (100%) create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/nested/pipeline file.sdspipe create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/nested/skip pipeline file.sdspipe create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/nested/skip stub file.sdsstub create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/nested/skip test file.sdstest create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/nested/stub file.sdsstub create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/nested/test file.sdstest create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/not a safe-ds file.txt create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/pipeline file.sdspipe create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/skip pipeline file.sdspipe create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/skip stub file.sdsstub create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/skip test file.sdstest create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/stub file.sdsstub create mode 100644 DSL-langium/tests/resources/helpers/listTestResources/test file.sdstest create mode 100644 DSL-langium/vitest.config.ts delete mode 100644 DSL/langium/SafeDS-types.langium delete mode 100644 DSL/langium/SafeDS.langium create mode 100644 docs/development/grammar-testing.md diff --git a/.eslintignore b/.eslintignore index 07d3b29d5..0abfe6b3f 100644 --- a/.eslintignore +++ b/.eslintignore @@ -2,3 +2,6 @@ build/ dist/ out/ + +# DSL-langium +/DSL-langium/vitest.config.ts diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 023dd7e33..2a51f01d8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -80,6 +80,12 @@ jobs: - name: Install dependencies run: npm ci + - name: Generate Langium files + run: npm run langium:generate + + - name: Compile TypeScript + run: npm run build + - name: Test with Vitest run: npm run test-with-coverage diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 57566472f..563a0b234 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -96,6 +96,12 @@ jobs: - name: Install dependencies run: npm ci + - name: Generate Langium files + run: npm run langium:generate + + - name: Compile TypeScript + run: npm run build + - name: Test with Vitest run: npm run test-with-coverage diff --git a/.gitignore b/.gitignore index 37c62f0e1..de14fd9e1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,7 @@ coverage/ dist/ dist-ssr/ out/ +/DSL-langium/syntaxes/safe-ds.tmLanguage.json # Gradle .gradle/ diff --git a/DSL-langium/bin/cli b/DSL-langium/bin/cli index f0a525864..605854368 100644 --- a/DSL-langium/bin/cli +++ b/DSL-langium/bin/cli @@ -1,3 +1,3 @@ #!/usr/bin/env node -require("../out/cli").default(); \ No newline at end of file +require("../out/src/cli").default(); diff --git a/DSL-langium/langium-config.json b/DSL-langium/langium-config.json index 6ded9333a..b937942ef 100644 --- a/DSL-langium/langium-config.json +++ b/DSL-langium/langium-config.json @@ -4,7 +4,7 @@ { "id": "safe-ds", "grammar": "src/language-server/grammar/safe-ds.langium", - "fileExtensions": [".sdspipe", ".sdsschema", ".sdsstub", ".sdstest"], + "fileExtensions": [".sdspipe", ".sdsstub", ".sdstest"], "textMate": { "out": "syntaxes/safe-ds.tmLanguage.json" } diff --git a/DSL-langium/language-configuration.json b/DSL-langium/language-configuration.json index b5e3d7dc2..92d75bae8 100644 --- a/DSL-langium/language-configuration.json +++ b/DSL-langium/language-configuration.json @@ -6,20 +6,24 @@ "brackets": [ ["{", "}"], ["[", "]"], - ["(", ")"] + ["(", ")"], + ["»", "«"] ], "autoClosingPairs": [ ["{", "}"], ["[", "]"], ["(", ")"], + ["»", "«"], ["\"", "\""], - ["'", "'"] + ["`", "`"] ], "surroundingPairs": [ ["{", "}"], ["[", "]"], ["(", ")"], + ["<", ">"], + ["»", "«"], ["\"", "\""], - ["'", "'"] + ["`", "`"] ] } diff --git a/DSL-langium/package-lock.json b/DSL-langium/package-lock.json index 38eec9c53..64da339d6 100644 --- a/DSL-langium/package-lock.json +++ b/DSL-langium/package-lock.json @@ -11,7 +11,7 @@ "chalk": "^5.2.0", "chevrotain": "^10.5.0", "commander": "^10.0.0", - "glob": "^9.3.4", + "glob": "^10.0.0", "langium": "^1.1.0", "radash": "^10.8.1", "true-myth": "^6.2.0", @@ -25,10 +25,10 @@ "devDependencies": { "@types/node": "^18.15.11", "@types/vscode": "~1.77.0", - "@vitest/coverage-c8": "^0.29.8", + "@vitest/coverage-c8": "^0.30.1", "langium-cli": "^1.1.0", "typescript": "^5.0.4", - "vitest": "^0.29.8" + "vitest": "^0.30.1" }, "engines": { "vscode": "^1.77.0" @@ -69,10 +69,346 @@ "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-10.5.0.tgz", "integrity": "sha512-hBzuU5+JjB2cqNZyszkDHZgOSrUUT8V3dhgRl8Q9Gp6dAj/H5+KILGjbhDpc3Iy9qmqlm/akuOI2ut9VUtzJxQ==" }, + "node_modules/@esbuild/android-arm": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.16.tgz", + "integrity": "sha512-baLqRpLe4JnKrUXLJChoTN0iXZH7El/mu58GE3WIA6/H834k0XWvLRmGLG8y8arTRS9hJJibPnF0tiGhmWeZgw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.16.tgz", + "integrity": "sha512-QX48qmsEZW+gcHgTmAj+x21mwTz8MlYQBnzF6861cNdQGvj2jzzFjqH0EBabrIa/WVZ2CHolwMoqxVryqKt8+Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.16.tgz", + "integrity": "sha512-G4wfHhrrz99XJgHnzFvB4UwwPxAWZaZBOFXh+JH1Duf1I4vIVfuYY9uVLpx4eiV2D/Jix8LJY+TAdZ3i40tDow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.16.tgz", + "integrity": "sha512-/Ofw8UXZxuzTLsNFmz1+lmarQI6ztMZ9XktvXedTbt3SNWDn0+ODTwxExLYQ/Hod91EZB4vZPQJLoqLF0jvEzA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.16.tgz", + "integrity": "sha512-SzBQtCV3Pdc9kyizh36Ol+dNVhkDyIrGb/JXZqFq8WL37LIyrXU0gUpADcNV311sCOhvY+f2ivMhb5Tuv8nMOQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.16.tgz", + "integrity": "sha512-ZqftdfS1UlLiH1DnS2u3It7l4Bc3AskKeu+paJSfk7RNOMrOxmeFDhLTMQqMxycP1C3oj8vgkAT6xfAuq7ZPRA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.16.tgz", + "integrity": "sha512-rHV6zNWW1tjgsu0dKQTX9L0ByiJHHLvQKrWtnz8r0YYJI27FU3Xu48gpK2IBj1uCSYhJ+pEk6Y0Um7U3rIvV8g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.16.tgz", + "integrity": "sha512-n4O8oVxbn7nl4+m+ISb0a68/lcJClIbaGAoXwqeubj/D1/oMMuaAXmJVfFlRjJLu/ZvHkxoiFJnmbfp4n8cdSw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.16.tgz", + "integrity": "sha512-8yoZhGkU6aHu38WpaM4HrRLTFc7/VVD9Q2SvPcmIQIipQt2I/GMTZNdEHXoypbbGao5kggLcxg0iBKjo0SQYKA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.16.tgz", + "integrity": "sha512-9ZBjlkdaVYxPNO8a7OmzDbOH9FMQ1a58j7Xb21UfRU29KcEEU3VTHk+Cvrft/BNv0gpWJMiiZ/f4w0TqSP0gLA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.16.tgz", + "integrity": "sha512-TIZTRojVBBzdgChY3UOG7BlPhqJz08AL7jdgeeu+kiObWMFzGnQD7BgBBkWRwOtKR1i2TNlO7YK6m4zxVjjPRQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.16.tgz", + "integrity": "sha512-UPeRuFKCCJYpBbIdczKyHLAIU31GEm0dZl1eMrdYeXDH+SJZh/i+2cAmD3A1Wip9pIc5Sc6Kc5cFUrPXtR0XHA==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.16.tgz", + "integrity": "sha512-io6yShgIEgVUhExJejJ21xvO5QtrbiSeI7vYUnr7l+v/O9t6IowyhdiYnyivX2X5ysOVHAuyHW+Wyi7DNhdw6Q==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.16.tgz", + "integrity": "sha512-WhlGeAHNbSdG/I2gqX2RK2gfgSNwyJuCiFHMc8s3GNEMMHUI109+VMBfhVqRb0ZGzEeRiibi8dItR3ws3Lk+cA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.16.tgz", + "integrity": "sha512-gHRReYsJtViir63bXKoFaQ4pgTyah4ruiMRQ6im9YZuv+gp3UFJkNTY4sFA73YDynmXZA6hi45en4BGhNOJUsw==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.16.tgz", + "integrity": "sha512-mfiiBkxEbUHvi+v0P+TS7UnA9TeGXR48aK4XHkTj0ZwOijxexgMF01UDFaBX7Q6CQsB0d+MFNv9IiXbIHTNd4g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.16.tgz", + "integrity": "sha512-n8zK1YRDGLRZfVcswcDMDM0j2xKYLNXqei217a4GyBxHIuPMGrrVuJ+Ijfpr0Kufcm7C1k/qaIrGy6eG7wvgmA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.16.tgz", + "integrity": "sha512-lEEfkfsUbo0xC47eSTBqsItXDSzwzwhKUSsVaVjVji07t8+6KA5INp2rN890dHZeueXJAI8q0tEIfbwVRYf6Ew==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.16.tgz", + "integrity": "sha512-jlRjsuvG1fgGwnE8Afs7xYDnGz0dBgTNZfgCK6TlvPH3Z13/P5pi6I57vyLE8qZYLrGVtwcm9UbUx1/mZ8Ukag==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.16.tgz", + "integrity": "sha512-TzoU2qwVe2boOHl/3KNBUv2PNUc38U0TNnzqOAcgPiD/EZxT2s736xfC2dYQbszAwo4MKzzwBV0iHjhfjxMimg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.16.tgz", + "integrity": "sha512-B8b7W+oo2yb/3xmwk9Vc99hC9bNolvqjaTZYEfMQhzdpBsjTvZBlXQ/teUE55Ww6sg//wlcDjOaqldOKyigWdA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/win32-x64": { - "version": "0.17.15", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.15.tgz", - "integrity": "sha512-DjDa9ywLUUmjhV2Y9wUTIF+1XsmuFGvZoCmOWkli1XcNAh5t25cc7fgsCx4Zi/Uurep3TTLyDiKATgGEg61pkA==", + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.16.tgz", + "integrity": "sha512-xJ7OH/nanouJO9pf03YsL9NAFQBHd8AqfrQd7Pf5laGyyTt/gToul6QYOA/i5i/q8y9iaM5DQFNTgpi995VkOg==", "cpu": [ "x64" ], @@ -153,40 +489,41 @@ "dev": true }, "node_modules/@vitest/coverage-c8": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/coverage-c8/-/coverage-c8-0.29.8.tgz", - "integrity": "sha512-y+sEMQMctWokjnSqm3FCQEYFkjLrYaznsxEZHxcx8z2aftpYg3A5tvI1S5himfdEFo7o+OeHzh40bPSWZHW4oQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/coverage-c8/-/coverage-c8-0.30.1.tgz", + "integrity": "sha512-/Wa3dtSuckpdngAmiCwowaEXXgJkqPrtfvrs9HTB9QoEfNbZWPu4E4cjEn4lJZb4qcGf4fxFtUA2f9DnDNAzBA==", "dev": true, "dependencies": { "c8": "^7.13.0", "picocolors": "^1.0.0", - "std-env": "^3.3.1" + "std-env": "^3.3.2" }, "funding": { "url": "https://github.com/sponsors/antfu" }, "peerDependencies": { - "vitest": ">=0.29.0 <1" + "vitest": ">=0.30.0 <1" } }, "node_modules/@vitest/expect": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.29.8.tgz", - "integrity": "sha512-xlcVXn5I5oTq6NiZSY3ykyWixBxr5mG8HYtjvpgg6KaqHm0mvhX18xuwl5YGxIRNt/A5jidd7CWcNHrSvgaQqQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.30.1.tgz", + "integrity": "sha512-c3kbEtN8XXJSeN81iDGq29bUzSjQhjES2WR3aColsS4lPGbivwLtas4DNUe0jD9gg/FYGIteqOenfU95EFituw==", "dev": true, "dependencies": { - "@vitest/spy": "0.29.8", - "@vitest/utils": "0.29.8", + "@vitest/spy": "0.30.1", + "@vitest/utils": "0.30.1", "chai": "^4.3.7" } }, "node_modules/@vitest/runner": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.29.8.tgz", - "integrity": "sha512-FzdhnRDwEr/A3Oo1jtIk/B952BBvP32n1ObMEb23oEJNO+qO5cBet6M2XWIDQmA7BDKGKvmhUf2naXyp/2JEwQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.30.1.tgz", + "integrity": "sha512-W62kT/8i0TF1UBCNMRtRMOBWJKRnNyv9RrjIgdUryEe0wNpGZvvwPDLuzYdxvgSckzjp54DSpv1xUbv4BQ0qVA==", "dev": true, "dependencies": { - "@vitest/utils": "0.29.8", + "@vitest/utils": "0.30.1", + "concordance": "^5.0.4", "p-limit": "^4.0.0", "pathe": "^1.1.0" } @@ -218,23 +555,33 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@vitest/snapshot": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.30.1.tgz", + "integrity": "sha512-fJZqKrE99zo27uoZA/azgWyWbFvM1rw2APS05yB0JaLwUIg9aUtvvnBf4q7JWhEcAHmSwbrxKFgyBUga6tq9Tw==", + "dev": true, + "dependencies": { + "magic-string": "^0.30.0", + "pathe": "^1.1.0", + "pretty-format": "^27.5.1" + } + }, "node_modules/@vitest/spy": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.29.8.tgz", - "integrity": "sha512-VdjBe9w34vOMl5I5mYEzNX8inTxrZ+tYUVk9jxaZJmHFwmDFC/GV3KBFTA/JKswr3XHvZL+FE/yq5EVhb6pSAw==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.30.1.tgz", + "integrity": "sha512-YfJeIf37GvTZe04ZKxzJfnNNuNSmTEGnla2OdL60C8od16f3zOfv9q9K0nNii0NfjDJRt/CVN/POuY5/zTS+BA==", "dev": true, "dependencies": { - "tinyspy": "^1.0.2" + "tinyspy": "^2.1.0" } }, "node_modules/@vitest/utils": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.29.8.tgz", - "integrity": "sha512-qGzuf3vrTbnoY+RjjVVIBYfuWMjn3UMUqyQtdGNZ6ZIIyte7B37exj6LaVkrZiUTvzSadVvO/tJm8AEgbGCBPg==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.30.1.tgz", + "integrity": "sha512-/c8Xv2zUVc+rnNt84QF0Y0zkfxnaGhp87K2dYJMLtLOIckPzuxLVzAtFCicGFdB4NeBHNzTRr1tNn7rCtQcWFA==", "dev": true, "dependencies": { - "cli-truncate": "^3.1.0", - "diff": "^5.1.0", + "concordance": "^5.0.4", "loupe": "^2.3.6", "pretty-format": "^27.5.1" } @@ -298,6 +645,12 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "node_modules/blueimp-md5": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", + "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==", + "dev": true + }, "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -394,22 +747,6 @@ "regexp-to-ast": "0.5.0" } }, - "node_modules/cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", - "dev": true, - "dependencies": { - "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" - }, - "engines": { - "node": "^12.20.0 || ^14.13.1 || >=16.0.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -482,6 +819,25 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "node_modules/concordance": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.4.tgz", + "integrity": "sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==", + "dev": true, + "dependencies": { + "date-time": "^3.1.0", + "esutils": "^2.0.3", + "fast-diff": "^1.2.0", + "js-string-escape": "^1.0.1", + "lodash": "^4.17.15", + "md5-hex": "^3.0.1", + "semver": "^7.3.2", + "well-known-symbols": "^2.0.0" + }, + "engines": { + "node": ">=10.18.0 <11 || >=12.14.0 <13 || >=14" + } + }, "node_modules/convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", @@ -502,6 +858,18 @@ "node": ">= 8" } }, + "node_modules/date-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz", + "integrity": "sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==", + "dev": true, + "dependencies": { + "time-zone": "^1.0.0" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -531,31 +899,10 @@ "node": ">=6" } }, - "node_modules/diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "node_modules/emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, "node_modules/esbuild": { - "version": "0.17.15", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.15.tgz", - "integrity": "sha512-LBUV2VsUIc/iD9ME75qhT4aJj0r75abCVS0jakhFzOtR7TQsqQA5w0tZ+KTKnwl3kXE0MhskNdHDh/I5aCR1Zw==", + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.16.tgz", + "integrity": "sha512-aeSuUKr9aFVY9Dc8ETVELGgkj4urg5isYx8pLf4wlGgB0vTFjxJQdHnNH6Shmx4vYYrOTLCHtRI5i1XZ9l2Zcg==", "dev": true, "hasInstallScript": true, "bin": { @@ -565,28 +912,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.17.15", - "@esbuild/android-arm64": "0.17.15", - "@esbuild/android-x64": "0.17.15", - "@esbuild/darwin-arm64": "0.17.15", - "@esbuild/darwin-x64": "0.17.15", - "@esbuild/freebsd-arm64": "0.17.15", - "@esbuild/freebsd-x64": "0.17.15", - "@esbuild/linux-arm": "0.17.15", - "@esbuild/linux-arm64": "0.17.15", - "@esbuild/linux-ia32": "0.17.15", - "@esbuild/linux-loong64": "0.17.15", - "@esbuild/linux-mips64el": "0.17.15", - "@esbuild/linux-ppc64": "0.17.15", - "@esbuild/linux-riscv64": "0.17.15", - "@esbuild/linux-s390x": "0.17.15", - "@esbuild/linux-x64": "0.17.15", - "@esbuild/netbsd-x64": "0.17.15", - "@esbuild/openbsd-x64": "0.17.15", - "@esbuild/sunos-x64": "0.17.15", - "@esbuild/win32-arm64": "0.17.15", - "@esbuild/win32-ia32": "0.17.15", - "@esbuild/win32-x64": "0.17.15" + "@esbuild/android-arm": "0.17.16", + "@esbuild/android-arm64": "0.17.16", + "@esbuild/android-x64": "0.17.16", + "@esbuild/darwin-arm64": "0.17.16", + "@esbuild/darwin-x64": "0.17.16", + "@esbuild/freebsd-arm64": "0.17.16", + "@esbuild/freebsd-x64": "0.17.16", + "@esbuild/linux-arm": "0.17.16", + "@esbuild/linux-arm64": "0.17.16", + "@esbuild/linux-ia32": "0.17.16", + "@esbuild/linux-loong64": "0.17.16", + "@esbuild/linux-mips64el": "0.17.16", + "@esbuild/linux-ppc64": "0.17.16", + "@esbuild/linux-riscv64": "0.17.16", + "@esbuild/linux-s390x": "0.17.16", + "@esbuild/linux-x64": "0.17.16", + "@esbuild/netbsd-x64": "0.17.16", + "@esbuild/openbsd-x64": "0.17.16", + "@esbuild/sunos-x64": "0.17.16", + "@esbuild/win32-arm64": "0.17.16", + "@esbuild/win32-ia32": "0.17.16", + "@esbuild/win32-x64": "0.17.16" } }, "node_modules/escalade": { @@ -598,6 +945,21 @@ "node": ">=6" } }, + "node_modules/esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -646,6 +1008,20 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "node_modules/fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -671,14 +1047,14 @@ } }, "node_modules/glob": { - "version": "9.3.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.4.tgz", - "integrity": "sha512-qaSc49hojMOv1EPM4EuyITjDSgSKI0rthoHnvE81tcOi1SCVndHko7auqxdQ14eiQG2NDBJBE86+2xIrbIvrbA==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.0.0.tgz", + "integrity": "sha512-zmp9ZDC6NpDNLujV2W2n+3lH+BafIVZ4/ct+Yj3BMZTH/+bgm/eVjHzeFLwxJrrIGgjjS2eiQLlpurHsNlEAtQ==", "dependencies": { "fs.realpath": "^1.0.0", - "minimatch": "^8.0.2", - "minipass": "^4.2.4", - "path-scurry": "^1.6.1" + "minimatch": "^9.0.0", + "minipass": "^5.0.0", + "path-scurry": "^1.6.4" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -696,9 +1072,9 @@ } }, "node_modules/glob/node_modules/minimatch": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.3.tgz", - "integrity": "sha512-tEEvU9TkZgnFDCtpnrEYnPsjT7iUx42aXfs4bzmQ5sMA09/6hZY0jeZcGkXyDagiBOvkUjNo8Viom+Me6+2x7g==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz", + "integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -759,9 +1135,9 @@ "dev": true }, "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", + "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", "dev": true, "dependencies": { "has": "^1.0.3" @@ -770,18 +1146,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, "node_modules/isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -824,6 +1188,15 @@ "node": ">=8" } }, + "node_modules/js-string-escape": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", + "integrity": "sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, "node_modules/jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", @@ -955,6 +1328,14 @@ "chevrotain": "~10.4.1" } }, + "node_modules/langium/node_modules/vscode-jsonrpc": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz", + "integrity": "sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ==", + "engines": { + "node": ">=14.0.0" + } + }, "node_modules/langium/node_modules/vscode-languageserver": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-8.0.2.tgz", @@ -966,6 +1347,20 @@ "installServerIntoExtension": "bin/installServerIntoExtension" } }, + "node_modules/langium/node_modules/vscode-languageserver-protocol": { + "version": "3.17.2", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.2.tgz", + "integrity": "sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg==", + "dependencies": { + "vscode-jsonrpc": "8.0.2", + "vscode-languageserver-types": "3.17.2" + } + }, + "node_modules/langium/node_modules/vscode-languageserver-types": { + "version": "3.17.2", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz", + "integrity": "sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==" + }, "node_modules/local-pkg": { "version": "0.4.3", "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz", @@ -1018,6 +1413,18 @@ "node": ">=10" } }, + "node_modules/magic-string": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", + "integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.13" + }, + "engines": { + "node": ">=12" + } + }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -1042,6 +1449,18 @@ "semver": "bin/semver.js" } }, + "node_modules/md5-hex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz", + "integrity": "sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==", + "dev": true, + "dependencies": { + "blueimp-md5": "^2.10.0" + }, + "engines": { + "node": ">=8" + } + }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -1055,9 +1474,9 @@ } }, "node_modules/minipass": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.5.tgz", - "integrity": "sha512-+yQl7SX3bIT83Lhb4BVorMAHVuqsskxRdlmO9kTpyukp8vsm2Sn/fUOV9xlnG8/a5JsypJzap21lz/y3FBMJ8Q==", + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==", "engines": { "node": ">=8" } @@ -1171,12 +1590,12 @@ "dev": true }, "node_modules/path-scurry": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.6.3.tgz", - "integrity": "sha512-RAmB+n30SlN+HnNx6EbcpoDy9nwdpcGPnEKrJnu6GZoDWBdIjo1UQMVtW2ybtC7LC2oKLcMq8y5g8WnKLiod9g==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.6.4.tgz", + "integrity": "sha512-Qp/9IHkdNiXJ3/Kon++At2nVpnhRiPq/aSvQN+H3U1WZbvNRK0RIQK/o4HMqPoXjpuGJUEWpHSs6Mnjxqh3TQg==", "dependencies": { - "lru-cache": "^7.14.1", - "minipass": "^4.0.2" + "lru-cache": "^9.0.0", + "minipass": "^5.0.0" }, "engines": { "node": ">=16 || 14 >=14.17" @@ -1186,11 +1605,11 @@ } }, "node_modules/path-scurry/node_modules/lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==", + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.0.1.tgz", + "integrity": "sha512-C8QsKIN1UIXeOs3iWmiZ1lQY+EnKDojWd37fXy1aSbJvH4iSma1uy2OWuoB3m4SYRli5+CUjDv3Dij5DVoetmg==", "engines": { - "node": ">=12" + "node": "14 || >=16.14" } }, "node_modules/pathe": { @@ -1418,34 +1837,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "node_modules/slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/slice-ansi?sponsor=1" - } - }, - "node_modules/slice-ansi/node_modules/ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, "node_modules/source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -1476,50 +1867,6 @@ "integrity": "sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==", "dev": true }, - "node_modules/string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "dependencies": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/string-width/node_modules/ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/ansi-regex?sponsor=1" - } - }, - "node_modules/string-width/node_modules/strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "dependencies": { - "ansi-regex": "^6.0.1" - }, - "engines": { - "node": ">=12" - }, - "funding": { - "url": "https://github.com/chalk/strip-ansi?sponsor=1" - } - }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -1602,6 +1949,15 @@ "url": "https://github.com/sponsors/isaacs" } }, + "node_modules/time-zone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", + "integrity": "sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==", + "dev": true, + "engines": { + "node": ">=4" + } + }, "node_modules/tinybench": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.4.0.tgz", @@ -1618,9 +1974,9 @@ } }, "node_modules/tinyspy": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.1.1.tgz", - "integrity": "sha512-UVq5AXt/gQlti7oxoIg5oi/9r0WpF7DGEVwXgqWSMmyN16+e3tl5lIvTaOpJ3TAtu5xFzWccFRM4R5NaWHF+4g==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.1.0.tgz", + "integrity": "sha512-7eORpyqImoOvkQJCSkL0d0mB4NHHIFAy4b1u8PHdDa7SjGS2njzl6/lyGoZLm+eyYEtlUmFGE0rFj66SWxZgQQ==", "dev": true, "engines": { "node": ">=14.0.0" @@ -1735,14 +2091,14 @@ } }, "node_modules/vite-node": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.29.8.tgz", - "integrity": "sha512-b6OtCXfk65L6SElVM20q5G546yu10/kNrhg08afEoWlFRJXFq9/6glsvSVY+aI6YeC1tu2TtAqI2jHEQmOmsFw==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.30.1.tgz", + "integrity": "sha512-vTikpU/J7e6LU/8iM3dzBo8ZhEiKZEKRznEMm+mJh95XhWaPrJQraT/QsT2NWmuEf+zgAoMe64PKT7hfZ1Njmg==", "dev": true, "dependencies": { "cac": "^6.7.14", "debug": "^4.3.4", - "mlly": "^1.1.0", + "mlly": "^1.2.0", "pathe": "^1.1.0", "picocolors": "^1.0.0", "vite": "^3.0.0 || ^4.0.0" @@ -1751,48 +2107,50 @@ "vite-node": "vite-node.mjs" }, "engines": { - "node": ">=v14.16.0" + "node": ">=v14.18.0" }, "funding": { "url": "https://github.com/sponsors/antfu" } }, "node_modules/vitest": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.29.8.tgz", - "integrity": "sha512-JIAVi2GK5cvA6awGpH0HvH/gEG9PZ0a/WoxdiV3PmqK+3CjQMf8c+J/Vhv4mdZ2nRyXFw66sAg6qz7VNkaHfDQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.30.1.tgz", + "integrity": "sha512-y35WTrSTlTxfMLttgQk4rHcaDkbHQwDP++SNwPb+7H8yb13Q3cu2EixrtHzF27iZ8v0XCciSsLg00RkPAzB/aA==", "dev": true, "dependencies": { "@types/chai": "^4.3.4", "@types/chai-subset": "^1.3.3", "@types/node": "*", - "@vitest/expect": "0.29.8", - "@vitest/runner": "0.29.8", - "@vitest/spy": "0.29.8", - "@vitest/utils": "0.29.8", - "acorn": "^8.8.1", + "@vitest/expect": "0.30.1", + "@vitest/runner": "0.30.1", + "@vitest/snapshot": "0.30.1", + "@vitest/spy": "0.30.1", + "@vitest/utils": "0.30.1", + "acorn": "^8.8.2", "acorn-walk": "^8.2.0", "cac": "^6.7.14", "chai": "^4.3.7", + "concordance": "^5.0.4", "debug": "^4.3.4", - "local-pkg": "^0.4.2", + "local-pkg": "^0.4.3", + "magic-string": "^0.30.0", "pathe": "^1.1.0", "picocolors": "^1.0.0", "source-map": "^0.6.1", - "std-env": "^3.3.1", - "strip-literal": "^1.0.0", - "tinybench": "^2.3.1", + "std-env": "^3.3.2", + "strip-literal": "^1.0.1", + "tinybench": "^2.4.0", "tinypool": "^0.4.0", - "tinyspy": "^1.0.2", "vite": "^3.0.0 || ^4.0.0", - "vite-node": "0.29.8", + "vite-node": "0.30.1", "why-is-node-running": "^2.2.2" }, "bin": { "vitest": "vitest.mjs" }, "engines": { - "node": ">=v14.16.0" + "node": ">=v14.18.0" }, "funding": { "url": "https://github.com/sponsors/antfu" @@ -1835,9 +2193,9 @@ } }, "node_modules/vscode-jsonrpc": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz", - "integrity": "sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.1.0.tgz", + "integrity": "sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==", "engines": { "node": ">=14.0.0" } @@ -1874,28 +2232,6 @@ "node": ">=10" } }, - "node_modules/vscode-languageclient/node_modules/vscode-jsonrpc": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.1.0.tgz", - "integrity": "sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/vscode-languageclient/node_modules/vscode-languageserver-protocol": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.3.tgz", - "integrity": "sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==", - "dependencies": { - "vscode-jsonrpc": "8.1.0", - "vscode-languageserver-types": "3.17.3" - } - }, - "node_modules/vscode-languageclient/node_modules/vscode-languageserver-types": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz", - "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" - }, "node_modules/vscode-languageserver": { "version": "8.1.0", "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-8.1.0.tgz", @@ -1908,12 +2244,12 @@ } }, "node_modules/vscode-languageserver-protocol": { - "version": "3.17.2", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.2.tgz", - "integrity": "sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg==", + "version": "3.17.3", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.3.tgz", + "integrity": "sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==", "dependencies": { - "vscode-jsonrpc": "8.0.2", - "vscode-languageserver-types": "3.17.2" + "vscode-jsonrpc": "8.1.0", + "vscode-languageserver-types": "3.17.3" } }, "node_modules/vscode-languageserver-textdocument": { @@ -1922,28 +2258,6 @@ "integrity": "sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==" }, "node_modules/vscode-languageserver-types": { - "version": "3.17.2", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz", - "integrity": "sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==" - }, - "node_modules/vscode-languageserver/node_modules/vscode-jsonrpc": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.1.0.tgz", - "integrity": "sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==", - "engines": { - "node": ">=14.0.0" - } - }, - "node_modules/vscode-languageserver/node_modules/vscode-languageserver-protocol": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.3.tgz", - "integrity": "sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==", - "dependencies": { - "vscode-jsonrpc": "8.1.0", - "vscode-languageserver-types": "3.17.3" - } - }, - "node_modules/vscode-languageserver/node_modules/vscode-languageserver-types": { "version": "3.17.3", "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz", "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" @@ -1953,6 +2267,15 @@ "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.7.tgz", "integrity": "sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA==" }, + "node_modules/well-known-symbols": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz", + "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==", + "dev": true, + "engines": { + "node": ">=6" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -2155,10 +2478,157 @@ "resolved": "https://registry.npmjs.org/@chevrotain/utils/-/utils-10.5.0.tgz", "integrity": "sha512-hBzuU5+JjB2cqNZyszkDHZgOSrUUT8V3dhgRl8Q9Gp6dAj/H5+KILGjbhDpc3Iy9qmqlm/akuOI2ut9VUtzJxQ==" }, + "@esbuild/android-arm": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.16.tgz", + "integrity": "sha512-baLqRpLe4JnKrUXLJChoTN0iXZH7El/mu58GE3WIA6/H834k0XWvLRmGLG8y8arTRS9hJJibPnF0tiGhmWeZgw==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.16.tgz", + "integrity": "sha512-QX48qmsEZW+gcHgTmAj+x21mwTz8MlYQBnzF6861cNdQGvj2jzzFjqH0EBabrIa/WVZ2CHolwMoqxVryqKt8+Q==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.16.tgz", + "integrity": "sha512-G4wfHhrrz99XJgHnzFvB4UwwPxAWZaZBOFXh+JH1Duf1I4vIVfuYY9uVLpx4eiV2D/Jix8LJY+TAdZ3i40tDow==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.16.tgz", + "integrity": "sha512-/Ofw8UXZxuzTLsNFmz1+lmarQI6ztMZ9XktvXedTbt3SNWDn0+ODTwxExLYQ/Hod91EZB4vZPQJLoqLF0jvEzA==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.16.tgz", + "integrity": "sha512-SzBQtCV3Pdc9kyizh36Ol+dNVhkDyIrGb/JXZqFq8WL37LIyrXU0gUpADcNV311sCOhvY+f2ivMhb5Tuv8nMOQ==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.16.tgz", + "integrity": "sha512-ZqftdfS1UlLiH1DnS2u3It7l4Bc3AskKeu+paJSfk7RNOMrOxmeFDhLTMQqMxycP1C3oj8vgkAT6xfAuq7ZPRA==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.16.tgz", + "integrity": "sha512-rHV6zNWW1tjgsu0dKQTX9L0ByiJHHLvQKrWtnz8r0YYJI27FU3Xu48gpK2IBj1uCSYhJ+pEk6Y0Um7U3rIvV8g==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.16.tgz", + "integrity": "sha512-n4O8oVxbn7nl4+m+ISb0a68/lcJClIbaGAoXwqeubj/D1/oMMuaAXmJVfFlRjJLu/ZvHkxoiFJnmbfp4n8cdSw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.16.tgz", + "integrity": "sha512-8yoZhGkU6aHu38WpaM4HrRLTFc7/VVD9Q2SvPcmIQIipQt2I/GMTZNdEHXoypbbGao5kggLcxg0iBKjo0SQYKA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.16.tgz", + "integrity": "sha512-9ZBjlkdaVYxPNO8a7OmzDbOH9FMQ1a58j7Xb21UfRU29KcEEU3VTHk+Cvrft/BNv0gpWJMiiZ/f4w0TqSP0gLA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.16.tgz", + "integrity": "sha512-TIZTRojVBBzdgChY3UOG7BlPhqJz08AL7jdgeeu+kiObWMFzGnQD7BgBBkWRwOtKR1i2TNlO7YK6m4zxVjjPRQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.16.tgz", + "integrity": "sha512-UPeRuFKCCJYpBbIdczKyHLAIU31GEm0dZl1eMrdYeXDH+SJZh/i+2cAmD3A1Wip9pIc5Sc6Kc5cFUrPXtR0XHA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.16.tgz", + "integrity": "sha512-io6yShgIEgVUhExJejJ21xvO5QtrbiSeI7vYUnr7l+v/O9t6IowyhdiYnyivX2X5ysOVHAuyHW+Wyi7DNhdw6Q==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.16.tgz", + "integrity": "sha512-WhlGeAHNbSdG/I2gqX2RK2gfgSNwyJuCiFHMc8s3GNEMMHUI109+VMBfhVqRb0ZGzEeRiibi8dItR3ws3Lk+cA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.16.tgz", + "integrity": "sha512-gHRReYsJtViir63bXKoFaQ4pgTyah4ruiMRQ6im9YZuv+gp3UFJkNTY4sFA73YDynmXZA6hi45en4BGhNOJUsw==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.16.tgz", + "integrity": "sha512-mfiiBkxEbUHvi+v0P+TS7UnA9TeGXR48aK4XHkTj0ZwOijxexgMF01UDFaBX7Q6CQsB0d+MFNv9IiXbIHTNd4g==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.16.tgz", + "integrity": "sha512-n8zK1YRDGLRZfVcswcDMDM0j2xKYLNXqei217a4GyBxHIuPMGrrVuJ+Ijfpr0Kufcm7C1k/qaIrGy6eG7wvgmA==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.16.tgz", + "integrity": "sha512-lEEfkfsUbo0xC47eSTBqsItXDSzwzwhKUSsVaVjVji07t8+6KA5INp2rN890dHZeueXJAI8q0tEIfbwVRYf6Ew==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.16.tgz", + "integrity": "sha512-jlRjsuvG1fgGwnE8Afs7xYDnGz0dBgTNZfgCK6TlvPH3Z13/P5pi6I57vyLE8qZYLrGVtwcm9UbUx1/mZ8Ukag==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.16.tgz", + "integrity": "sha512-TzoU2qwVe2boOHl/3KNBUv2PNUc38U0TNnzqOAcgPiD/EZxT2s736xfC2dYQbszAwo4MKzzwBV0iHjhfjxMimg==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.16.tgz", + "integrity": "sha512-B8b7W+oo2yb/3xmwk9Vc99hC9bNolvqjaTZYEfMQhzdpBsjTvZBlXQ/teUE55Ww6sg//wlcDjOaqldOKyigWdA==", + "dev": true, + "optional": true + }, "@esbuild/win32-x64": { - "version": "0.17.15", - "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.15.tgz", - "integrity": "sha512-DjDa9ywLUUmjhV2Y9wUTIF+1XsmuFGvZoCmOWkli1XcNAh5t25cc7fgsCx4Zi/Uurep3TTLyDiKATgGEg61pkA==", + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.16.tgz", + "integrity": "sha512-xJ7OH/nanouJO9pf03YsL9NAFQBHd8AqfrQd7Pf5laGyyTt/gToul6QYOA/i5i/q8y9iaM5DQFNTgpi995VkOg==", "dev": true, "optional": true }, @@ -2224,34 +2694,35 @@ "dev": true }, "@vitest/coverage-c8": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/coverage-c8/-/coverage-c8-0.29.8.tgz", - "integrity": "sha512-y+sEMQMctWokjnSqm3FCQEYFkjLrYaznsxEZHxcx8z2aftpYg3A5tvI1S5himfdEFo7o+OeHzh40bPSWZHW4oQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/coverage-c8/-/coverage-c8-0.30.1.tgz", + "integrity": "sha512-/Wa3dtSuckpdngAmiCwowaEXXgJkqPrtfvrs9HTB9QoEfNbZWPu4E4cjEn4lJZb4qcGf4fxFtUA2f9DnDNAzBA==", "dev": true, "requires": { "c8": "^7.13.0", "picocolors": "^1.0.0", - "std-env": "^3.3.1" + "std-env": "^3.3.2" } }, "@vitest/expect": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.29.8.tgz", - "integrity": "sha512-xlcVXn5I5oTq6NiZSY3ykyWixBxr5mG8HYtjvpgg6KaqHm0mvhX18xuwl5YGxIRNt/A5jidd7CWcNHrSvgaQqQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-0.30.1.tgz", + "integrity": "sha512-c3kbEtN8XXJSeN81iDGq29bUzSjQhjES2WR3aColsS4lPGbivwLtas4DNUe0jD9gg/FYGIteqOenfU95EFituw==", "dev": true, "requires": { - "@vitest/spy": "0.29.8", - "@vitest/utils": "0.29.8", + "@vitest/spy": "0.30.1", + "@vitest/utils": "0.30.1", "chai": "^4.3.7" } }, "@vitest/runner": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.29.8.tgz", - "integrity": "sha512-FzdhnRDwEr/A3Oo1jtIk/B952BBvP32n1ObMEb23oEJNO+qO5cBet6M2XWIDQmA7BDKGKvmhUf2naXyp/2JEwQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-0.30.1.tgz", + "integrity": "sha512-W62kT/8i0TF1UBCNMRtRMOBWJKRnNyv9RrjIgdUryEe0wNpGZvvwPDLuzYdxvgSckzjp54DSpv1xUbv4BQ0qVA==", "dev": true, "requires": { - "@vitest/utils": "0.29.8", + "@vitest/utils": "0.30.1", + "concordance": "^5.0.4", "p-limit": "^4.0.0", "pathe": "^1.1.0" }, @@ -2273,23 +2744,33 @@ } } }, + "@vitest/snapshot": { + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-0.30.1.tgz", + "integrity": "sha512-fJZqKrE99zo27uoZA/azgWyWbFvM1rw2APS05yB0JaLwUIg9aUtvvnBf4q7JWhEcAHmSwbrxKFgyBUga6tq9Tw==", + "dev": true, + "requires": { + "magic-string": "^0.30.0", + "pathe": "^1.1.0", + "pretty-format": "^27.5.1" + } + }, "@vitest/spy": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.29.8.tgz", - "integrity": "sha512-VdjBe9w34vOMl5I5mYEzNX8inTxrZ+tYUVk9jxaZJmHFwmDFC/GV3KBFTA/JKswr3XHvZL+FE/yq5EVhb6pSAw==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-0.30.1.tgz", + "integrity": "sha512-YfJeIf37GvTZe04ZKxzJfnNNuNSmTEGnla2OdL60C8od16f3zOfv9q9K0nNii0NfjDJRt/CVN/POuY5/zTS+BA==", "dev": true, "requires": { - "tinyspy": "^1.0.2" + "tinyspy": "^2.1.0" } }, "@vitest/utils": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.29.8.tgz", - "integrity": "sha512-qGzuf3vrTbnoY+RjjVVIBYfuWMjn3UMUqyQtdGNZ6ZIIyte7B37exj6LaVkrZiUTvzSadVvO/tJm8AEgbGCBPg==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-0.30.1.tgz", + "integrity": "sha512-/c8Xv2zUVc+rnNt84QF0Y0zkfxnaGhp87K2dYJMLtLOIckPzuxLVzAtFCicGFdB4NeBHNzTRr1tNn7rCtQcWFA==", "dev": true, "requires": { - "cli-truncate": "^3.1.0", - "diff": "^5.1.0", + "concordance": "^5.0.4", "loupe": "^2.3.6", "pretty-format": "^27.5.1" } @@ -2332,6 +2813,12 @@ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, + "blueimp-md5": { + "version": "2.19.0", + "resolved": "https://registry.npmjs.org/blueimp-md5/-/blueimp-md5-2.19.0.tgz", + "integrity": "sha512-DRQrD6gJyy8FbiE4s+bDoXS9hiW3Vbx5uCdwvcCf3zLHL+Iv7LtGHLpr+GZV8rHG8tK766FGYBwRbu8pELTt+w==", + "dev": true + }, "brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", @@ -2407,16 +2894,6 @@ "regexp-to-ast": "0.5.0" } }, - "cli-truncate": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/cli-truncate/-/cli-truncate-3.1.0.tgz", - "integrity": "sha512-wfOBkjXteqSnI59oPcJkcPl/ZmwvMMOj340qUIY1SKZCv0B9Cf4D4fAucRkIKQmsIuYK3x1rrgU7MeGRruiuiA==", - "dev": true, - "requires": { - "slice-ansi": "^5.0.0", - "string-width": "^5.0.0" - } - }, "cliui": { "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", @@ -2479,6 +2956,22 @@ "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", "dev": true }, + "concordance": { + "version": "5.0.4", + "resolved": "https://registry.npmjs.org/concordance/-/concordance-5.0.4.tgz", + "integrity": "sha512-OAcsnTEYu1ARJqWVGwf4zh4JDfHZEaSNlNccFmt8YjB2l/n19/PF2viLINHc57vO4FKIAFl2FWASIGZZWZ2Kxw==", + "dev": true, + "requires": { + "date-time": "^3.1.0", + "esutils": "^2.0.3", + "fast-diff": "^1.2.0", + "js-string-escape": "^1.0.1", + "lodash": "^4.17.15", + "md5-hex": "^3.0.1", + "semver": "^7.3.2", + "well-known-symbols": "^2.0.0" + } + }, "convert-source-map": { "version": "1.9.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.9.0.tgz", @@ -2496,6 +2989,15 @@ "which": "^2.0.1" } }, + "date-time": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/date-time/-/date-time-3.1.0.tgz", + "integrity": "sha512-uqCUKXE5q1PNBXjPqvwhwJf9SwMoAHBgWJ6DcrnS5o+W2JOiIILl0JEdVD8SGujrNS02GGxgwAg2PN2zONgtjg==", + "dev": true, + "requires": { + "time-zone": "^1.0.0" + } + }, "debug": { "version": "4.3.4", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", @@ -2514,52 +3016,34 @@ "type-detect": "^4.0.0" } }, - "diff": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.1.0.tgz", - "integrity": "sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==", - "dev": true - }, - "eastasianwidth": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/eastasianwidth/-/eastasianwidth-0.2.0.tgz", - "integrity": "sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==", - "dev": true - }, - "emoji-regex": { - "version": "9.2.2", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", - "integrity": "sha512-L18DaJsXSUk2+42pv8mLs5jJT2hqFkFE4j21wOmgbUqsZ2hL72NsUU785g9RXgo3s0ZNgVl42TiHp3ZtOv/Vyg==", - "dev": true - }, "esbuild": { - "version": "0.17.15", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.15.tgz", - "integrity": "sha512-LBUV2VsUIc/iD9ME75qhT4aJj0r75abCVS0jakhFzOtR7TQsqQA5w0tZ+KTKnwl3kXE0MhskNdHDh/I5aCR1Zw==", - "dev": true, - "requires": { - "@esbuild/android-arm": "0.17.15", - "@esbuild/android-arm64": "0.17.15", - "@esbuild/android-x64": "0.17.15", - "@esbuild/darwin-arm64": "0.17.15", - "@esbuild/darwin-x64": "0.17.15", - "@esbuild/freebsd-arm64": "0.17.15", - "@esbuild/freebsd-x64": "0.17.15", - "@esbuild/linux-arm": "0.17.15", - "@esbuild/linux-arm64": "0.17.15", - "@esbuild/linux-ia32": "0.17.15", - "@esbuild/linux-loong64": "0.17.15", - "@esbuild/linux-mips64el": "0.17.15", - "@esbuild/linux-ppc64": "0.17.15", - "@esbuild/linux-riscv64": "0.17.15", - "@esbuild/linux-s390x": "0.17.15", - "@esbuild/linux-x64": "0.17.15", - "@esbuild/netbsd-x64": "0.17.15", - "@esbuild/openbsd-x64": "0.17.15", - "@esbuild/sunos-x64": "0.17.15", - "@esbuild/win32-arm64": "0.17.15", - "@esbuild/win32-ia32": "0.17.15", - "@esbuild/win32-x64": "0.17.15" + "version": "0.17.16", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.17.16.tgz", + "integrity": "sha512-aeSuUKr9aFVY9Dc8ETVELGgkj4urg5isYx8pLf4wlGgB0vTFjxJQdHnNH6Shmx4vYYrOTLCHtRI5i1XZ9l2Zcg==", + "dev": true, + "requires": { + "@esbuild/android-arm": "0.17.16", + "@esbuild/android-arm64": "0.17.16", + "@esbuild/android-x64": "0.17.16", + "@esbuild/darwin-arm64": "0.17.16", + "@esbuild/darwin-x64": "0.17.16", + "@esbuild/freebsd-arm64": "0.17.16", + "@esbuild/freebsd-x64": "0.17.16", + "@esbuild/linux-arm": "0.17.16", + "@esbuild/linux-arm64": "0.17.16", + "@esbuild/linux-ia32": "0.17.16", + "@esbuild/linux-loong64": "0.17.16", + "@esbuild/linux-mips64el": "0.17.16", + "@esbuild/linux-ppc64": "0.17.16", + "@esbuild/linux-riscv64": "0.17.16", + "@esbuild/linux-s390x": "0.17.16", + "@esbuild/linux-x64": "0.17.16", + "@esbuild/netbsd-x64": "0.17.16", + "@esbuild/openbsd-x64": "0.17.16", + "@esbuild/sunos-x64": "0.17.16", + "@esbuild/win32-arm64": "0.17.16", + "@esbuild/win32-ia32": "0.17.16", + "@esbuild/win32-x64": "0.17.16" } }, "escalade": { @@ -2568,6 +3052,18 @@ "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", "dev": true }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "fast-diff": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fast-diff/-/fast-diff-1.2.0.tgz", + "integrity": "sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==", + "dev": true + }, "find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -2604,6 +3100,13 @@ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==" }, + "fsevents": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", + "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -2623,14 +3126,14 @@ "dev": true }, "glob": { - "version": "9.3.4", - "resolved": "https://registry.npmjs.org/glob/-/glob-9.3.4.tgz", - "integrity": "sha512-qaSc49hojMOv1EPM4EuyITjDSgSKI0rthoHnvE81tcOi1SCVndHko7auqxdQ14eiQG2NDBJBE86+2xIrbIvrbA==", + "version": "10.0.0", + "resolved": "https://registry.npmjs.org/glob/-/glob-10.0.0.tgz", + "integrity": "sha512-zmp9ZDC6NpDNLujV2W2n+3lH+BafIVZ4/ct+Yj3BMZTH/+bgm/eVjHzeFLwxJrrIGgjjS2eiQLlpurHsNlEAtQ==", "requires": { "fs.realpath": "^1.0.0", - "minimatch": "^8.0.2", - "minipass": "^4.2.4", - "path-scurry": "^1.6.1" + "minimatch": "^9.0.0", + "minipass": "^5.0.0", + "path-scurry": "^1.6.4" }, "dependencies": { "brace-expansion": { @@ -2642,9 +3145,9 @@ } }, "minimatch": { - "version": "8.0.3", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-8.0.3.tgz", - "integrity": "sha512-tEEvU9TkZgnFDCtpnrEYnPsjT7iUx42aXfs4bzmQ5sMA09/6hZY0jeZcGkXyDagiBOvkUjNo8Viom+Me6+2x7g==", + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.0.tgz", + "integrity": "sha512-0jJj8AvgKqWN05mrwuqi8QYKx1WmYSUoKSxu5Qhs9prezTz10sxAHGNZe9J9cqIJzta8DWsleh2KaVaLl6Ru2w==", "requires": { "brace-expansion": "^2.0.1" } @@ -2695,20 +3198,14 @@ "dev": true }, "is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.12.0.tgz", + "integrity": "sha512-RECHCBCd/viahWmwj6enj19sKbHfJrddi/6cBDsNTKbNq0f7VeaUkBo60BqzvPqo/W54ChS62Z5qyun7cfOMqQ==", "dev": true, "requires": { "has": "^1.0.3" } }, - "is-fullwidth-code-point": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-4.0.0.tgz", - "integrity": "sha512-O4L094N2/dZ7xqVdrXhh9r1KODPJpFms8B5sGdJLPy664AgvXsreZUyCQQNItZRDlYug4xStLjNp/sz3HvBowQ==", - "dev": true - }, "isexe": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", @@ -2742,6 +3239,12 @@ "istanbul-lib-report": "^3.0.0" } }, + "js-string-escape": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/js-string-escape/-/js-string-escape-1.0.1.tgz", + "integrity": "sha512-Smw4xcfIQ5LVjAOuJCvN/zIodzA/BBSsluuoSykP+lUvScIi4U6RJLfwHet5cxFnCswUjISV8oAXaqaJDY3chg==", + "dev": true + }, "jsonc-parser": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz", @@ -2826,6 +3329,11 @@ "lodash": "^4.17.21" } }, + "vscode-jsonrpc": { + "version": "8.0.2", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz", + "integrity": "sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ==" + }, "vscode-languageserver": { "version": "8.0.2", "resolved": "https://registry.npmjs.org/vscode-languageserver/-/vscode-languageserver-8.0.2.tgz", @@ -2833,6 +3341,20 @@ "requires": { "vscode-languageserver-protocol": "3.17.2" } + }, + "vscode-languageserver-protocol": { + "version": "3.17.2", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.2.tgz", + "integrity": "sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg==", + "requires": { + "vscode-jsonrpc": "8.0.2", + "vscode-languageserver-types": "3.17.2" + } + }, + "vscode-languageserver-types": { + "version": "3.17.2", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz", + "integrity": "sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==" } } }, @@ -2899,6 +3421,15 @@ "yallist": "^4.0.0" } }, + "magic-string": { + "version": "0.30.0", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.0.tgz", + "integrity": "sha512-LA+31JYDJLs82r2ScLrlz1GjSgu66ZV518eyWT+S8VhyQn/JL0u9MeBOvQMGYiPk1DBiSN9DDMOcXvigJZaViQ==", + "dev": true, + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.13" + } + }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -2916,6 +3447,15 @@ } } }, + "md5-hex": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/md5-hex/-/md5-hex-3.0.1.tgz", + "integrity": "sha512-BUiRtTtV39LIJwinWBjqVsU9xhdnz7/i889V859IBFpuqGAj6LuOvHv5XLbgZ2R7ptJoJaEcxkv88/h25T7Ciw==", + "dev": true, + "requires": { + "blueimp-md5": "^2.10.0" + } + }, "minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -2926,9 +3466,9 @@ } }, "minipass": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/minipass/-/minipass-4.2.5.tgz", - "integrity": "sha512-+yQl7SX3bIT83Lhb4BVorMAHVuqsskxRdlmO9kTpyukp8vsm2Sn/fUOV9xlnG8/a5JsypJzap21lz/y3FBMJ8Q==" + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-5.0.0.tgz", + "integrity": "sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==" }, "mlly": { "version": "1.2.0", @@ -3006,18 +3546,18 @@ "dev": true }, "path-scurry": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.6.3.tgz", - "integrity": "sha512-RAmB+n30SlN+HnNx6EbcpoDy9nwdpcGPnEKrJnu6GZoDWBdIjo1UQMVtW2ybtC7LC2oKLcMq8y5g8WnKLiod9g==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/path-scurry/-/path-scurry-1.6.4.tgz", + "integrity": "sha512-Qp/9IHkdNiXJ3/Kon++At2nVpnhRiPq/aSvQN+H3U1WZbvNRK0RIQK/o4HMqPoXjpuGJUEWpHSs6Mnjxqh3TQg==", "requires": { - "lru-cache": "^7.14.1", - "minipass": "^4.0.2" + "lru-cache": "^9.0.0", + "minipass": "^5.0.0" }, "dependencies": { "lru-cache": { - "version": "7.18.3", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-7.18.3.tgz", - "integrity": "sha512-jumlc0BIUrS3qJGgIkWZsyfAM7NCWiBcCDhnd+3NNM5KbBmLTgHVfWBcg6W+rLUsIpzpERPsvwUP7CckAQSOoA==" + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-9.0.1.tgz", + "integrity": "sha512-C8QsKIN1UIXeOs3iWmiZ1lQY+EnKDojWd37fXy1aSbJvH4iSma1uy2OWuoB3m4SYRli5+CUjDv3Dij5DVoetmg==" } } }, @@ -3182,24 +3722,6 @@ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", "dev": true }, - "slice-ansi": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-5.0.0.tgz", - "integrity": "sha512-FC+lgizVPfie0kkhqUScwRu1O/lF6NOgJmlCgK+/LYxDCTk8sGelYaHDhFcDN+Sn3Cv+3VSa4Byeo+IMCzpMgQ==", - "dev": true, - "requires": { - "ansi-styles": "^6.0.0", - "is-fullwidth-code-point": "^4.0.0" - }, - "dependencies": { - "ansi-styles": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-6.2.1.tgz", - "integrity": "sha512-bN798gFfQX+viw3R7yrGWRqnrN2oRkEkUjjl4JNn4E8GxxbjtG3FbrEIIY3l8/hrwUwIeCZvi4QuOTP4MErVug==", - "dev": true - } - } - }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -3224,34 +3746,6 @@ "integrity": "sha512-uUZI65yrV2Qva5gqE0+A7uVAvO40iPo6jGhs7s8keRfHCmtg+uB2X6EiLGCI9IgL1J17xGhvoOqSz79lzICPTA==", "dev": true }, - "string-width": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-5.1.2.tgz", - "integrity": "sha512-HnLOCR3vjcY8beoNLtcjZ5/nxn2afmME6lhrDrebokqMap+XbeW8n9TXpPDOqdGK5qcI3oT0GKTW6wC7EMiVqA==", - "dev": true, - "requires": { - "eastasianwidth": "^0.2.0", - "emoji-regex": "^9.2.2", - "strip-ansi": "^7.0.1" - }, - "dependencies": { - "ansi-regex": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-6.0.1.tgz", - "integrity": "sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==", - "dev": true - }, - "strip-ansi": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-7.0.1.tgz", - "integrity": "sha512-cXNxvT8dFNRVfhVME3JAe98mkXDYN2O1l7jmcwMnOslDeESg1rF/OZMtK0nRAhiari1unG5cD4jG3rapUAkLbw==", - "dev": true, - "requires": { - "ansi-regex": "^6.0.1" - } - } - } - }, "strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -3312,6 +3806,12 @@ } } }, + "time-zone": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/time-zone/-/time-zone-1.0.0.tgz", + "integrity": "sha512-TIsDdtKo6+XrPtiTm1ssmMngN1sAhyKnTO2kunQWqNPWIVvCm15Wmw4SWInwTVgJ5u/Tr04+8Ei9TNcw4x4ONA==", + "dev": true + }, "tinybench": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.4.0.tgz", @@ -3325,9 +3825,9 @@ "dev": true }, "tinyspy": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.1.1.tgz", - "integrity": "sha512-UVq5AXt/gQlti7oxoIg5oi/9r0WpF7DGEVwXgqWSMmyN16+e3tl5lIvTaOpJ3TAtu5xFzWccFRM4R5NaWHF+4g==", + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-2.1.0.tgz", + "integrity": "sha512-7eORpyqImoOvkQJCSkL0d0mB4NHHIFAy4b1u8PHdDa7SjGS2njzl6/lyGoZLm+eyYEtlUmFGE0rFj66SWxZgQQ==", "dev": true }, "true-myth": { @@ -3384,55 +3884,57 @@ } }, "vite-node": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.29.8.tgz", - "integrity": "sha512-b6OtCXfk65L6SElVM20q5G546yu10/kNrhg08afEoWlFRJXFq9/6glsvSVY+aI6YeC1tu2TtAqI2jHEQmOmsFw==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.30.1.tgz", + "integrity": "sha512-vTikpU/J7e6LU/8iM3dzBo8ZhEiKZEKRznEMm+mJh95XhWaPrJQraT/QsT2NWmuEf+zgAoMe64PKT7hfZ1Njmg==", "dev": true, "requires": { "cac": "^6.7.14", "debug": "^4.3.4", - "mlly": "^1.1.0", + "mlly": "^1.2.0", "pathe": "^1.1.0", "picocolors": "^1.0.0", "vite": "^3.0.0 || ^4.0.0" } }, "vitest": { - "version": "0.29.8", - "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.29.8.tgz", - "integrity": "sha512-JIAVi2GK5cvA6awGpH0HvH/gEG9PZ0a/WoxdiV3PmqK+3CjQMf8c+J/Vhv4mdZ2nRyXFw66sAg6qz7VNkaHfDQ==", + "version": "0.30.1", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.30.1.tgz", + "integrity": "sha512-y35WTrSTlTxfMLttgQk4rHcaDkbHQwDP++SNwPb+7H8yb13Q3cu2EixrtHzF27iZ8v0XCciSsLg00RkPAzB/aA==", "dev": true, "requires": { "@types/chai": "^4.3.4", "@types/chai-subset": "^1.3.3", "@types/node": "*", - "@vitest/expect": "0.29.8", - "@vitest/runner": "0.29.8", - "@vitest/spy": "0.29.8", - "@vitest/utils": "0.29.8", - "acorn": "^8.8.1", + "@vitest/expect": "0.30.1", + "@vitest/runner": "0.30.1", + "@vitest/snapshot": "0.30.1", + "@vitest/spy": "0.30.1", + "@vitest/utils": "0.30.1", + "acorn": "^8.8.2", "acorn-walk": "^8.2.0", "cac": "^6.7.14", "chai": "^4.3.7", + "concordance": "^5.0.4", "debug": "^4.3.4", - "local-pkg": "^0.4.2", + "local-pkg": "^0.4.3", + "magic-string": "^0.30.0", "pathe": "^1.1.0", "picocolors": "^1.0.0", "source-map": "^0.6.1", - "std-env": "^3.3.1", - "strip-literal": "^1.0.0", - "tinybench": "^2.3.1", + "std-env": "^3.3.2", + "strip-literal": "^1.0.1", + "tinybench": "^2.4.0", "tinypool": "^0.4.0", - "tinyspy": "^1.0.2", "vite": "^3.0.0 || ^4.0.0", - "vite-node": "0.29.8", + "vite-node": "0.30.1", "why-is-node-running": "^2.2.2" } }, "vscode-jsonrpc": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.0.2.tgz", - "integrity": "sha512-RY7HwI/ydoC1Wwg4gJ3y6LpU9FJRZAUnTYMXthqhFXXu77ErDd/xkREpGuk4MyYkk4a+XDWAMqe0S3KkelYQEQ==" + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.1.0.tgz", + "integrity": "sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==" }, "vscode-languageclient": { "version": "8.1.0", @@ -3459,25 +3961,6 @@ "requires": { "brace-expansion": "^2.0.1" } - }, - "vscode-jsonrpc": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.1.0.tgz", - "integrity": "sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==" - }, - "vscode-languageserver-protocol": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.3.tgz", - "integrity": "sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==", - "requires": { - "vscode-jsonrpc": "8.1.0", - "vscode-languageserver-types": "3.17.3" - } - }, - "vscode-languageserver-types": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz", - "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" } } }, @@ -3487,36 +3970,15 @@ "integrity": "sha512-eUt8f1z2N2IEUDBsKaNapkz7jl5QpskN2Y0G01T/ItMxBxw1fJwvtySGB9QMecatne8jFIWJGWI61dWjyTLQsw==", "requires": { "vscode-languageserver-protocol": "3.17.3" - }, - "dependencies": { - "vscode-jsonrpc": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/vscode-jsonrpc/-/vscode-jsonrpc-8.1.0.tgz", - "integrity": "sha512-6TDy/abTQk+zDGYazgbIPc+4JoXdwC8NHU9Pbn4UJP1fehUyZmM4RHp5IthX7A6L5KS30PRui+j+tbbMMMafdw==" - }, - "vscode-languageserver-protocol": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.3.tgz", - "integrity": "sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==", - "requires": { - "vscode-jsonrpc": "8.1.0", - "vscode-languageserver-types": "3.17.3" - } - }, - "vscode-languageserver-types": { - "version": "3.17.3", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz", - "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" - } } }, "vscode-languageserver-protocol": { - "version": "3.17.2", - "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.2.tgz", - "integrity": "sha512-8kYisQ3z/SQ2kyjlNeQxbkkTNmVFoQCqkmGrzLH6A9ecPlgTbp3wDTnUNqaUxYr4vlAcloxx8zwy7G5WdguYNg==", + "version": "3.17.3", + "resolved": "https://registry.npmjs.org/vscode-languageserver-protocol/-/vscode-languageserver-protocol-3.17.3.tgz", + "integrity": "sha512-924/h0AqsMtA5yK22GgMtCYiMdCOtWTSGgUOkgEDX+wk2b0x4sAfLiO4NxBxqbiVtz7K7/1/RgVrVI0NClZwqA==", "requires": { - "vscode-jsonrpc": "8.0.2", - "vscode-languageserver-types": "3.17.2" + "vscode-jsonrpc": "8.1.0", + "vscode-languageserver-types": "3.17.3" } }, "vscode-languageserver-textdocument": { @@ -3525,15 +3987,21 @@ "integrity": "sha512-1bonkGqQs5/fxGT5UchTgjGVnfysL0O8v1AYMBjqTbWQTFn721zaPGDYFkOKtfDgFiSgXM3KwaG3FMGfW4Ed9Q==" }, "vscode-languageserver-types": { - "version": "3.17.2", - "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.2.tgz", - "integrity": "sha512-zHhCWatviizPIq9B7Vh9uvrH6x3sK8itC84HkamnBWoDFJtzBf7SWlpLCZUit72b3os45h6RWQNC9xHRDF8dRA==" + "version": "3.17.3", + "resolved": "https://registry.npmjs.org/vscode-languageserver-types/-/vscode-languageserver-types-3.17.3.tgz", + "integrity": "sha512-SYU4z1dL0PyIMd4Vj8YOqFvHu7Hz/enbWtpfnVbJHU4Nd1YNYx8u0ennumc6h48GQNeOLxmwySmnADouT/AuZA==" }, "vscode-uri": { "version": "3.0.7", "resolved": "https://registry.npmjs.org/vscode-uri/-/vscode-uri-3.0.7.tgz", "integrity": "sha512-eOpPHogvorZRobNqJGhapa0JdwaxpjVvyBp0QIUMRMSf8ZAlqOdEquKuRmw9Qwu0qXtJIWqFtMkmvJjUZmMjVA==" }, + "well-known-symbols": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/well-known-symbols/-/well-known-symbols-2.0.0.tgz", + "integrity": "sha512-ZMjC3ho+KXo0BfJb7JgtQ5IBuvnShdlACNkKkdsqBmYw3bPAaJfPeYUo6tLUaT5tG/Gkh7xkpBhKRQ9e7pyg9Q==", + "dev": true + }, "which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", diff --git a/DSL-langium/package.json b/DSL-langium/package.json index 3f539d4e2..f7303107e 100644 --- a/DSL-langium/package.json +++ b/DSL-langium/package.json @@ -19,7 +19,6 @@ ], "extensions": [ ".sdspipe", - ".sdsschema", ".sdsstub", ".sdstest" ], @@ -45,13 +44,13 @@ "bin": { "safe-ds-cli": "./bin/cli" }, - "main": "./out/extension.js", + "main": "./out/src/extension.js", "scripts": { "vscode:prepublish": "npm run build && npm run lint", "build": "tsc -b tsconfig.json", "watch": "tsc -b tsconfig.json --watch", - "test": "vitest tests", - "test-with-coverage": "vitest tests --coverage", + "test": "vitest --dir tests", + "test-with-coverage": "vitest --coverage --dir tests", "langium:generate": "langium generate", "langium:watch": "langium generate --watch" }, @@ -59,7 +58,7 @@ "chalk": "^5.2.0", "chevrotain": "^10.5.0", "commander": "^10.0.0", - "glob": "^9.3.4", + "glob": "^10.0.0", "langium": "^1.1.0", "radash": "^10.8.1", "true-myth": "^6.2.0", @@ -70,9 +69,9 @@ "devDependencies": { "@types/node": "^18.15.11", "@types/vscode": "~1.77.0", - "@vitest/coverage-c8": "^0.29.8", + "@vitest/coverage-c8": "^0.30.1", "langium-cli": "^1.1.0", "typescript": "^5.0.4", - "vitest": "^0.29.8" + "vitest": "^0.30.1" } } diff --git a/DSL-langium/src/extension.ts b/DSL-langium/src/extension.ts index fce6ab0b8..5aad5c4be 100644 --- a/DSL-langium/src/extension.ts +++ b/DSL-langium/src/extension.ts @@ -18,7 +18,7 @@ export const deactivate = function (): Thenable | undefined { }; const startLanguageClient = function (context: vscode.ExtensionContext): LanguageClient { - const serverModule = context.asAbsolutePath(path.join('out', 'language-server', 'main')); + const serverModule = context.asAbsolutePath(path.join('out', 'src', 'language-server', 'main')); // The debug options for the server // --inspect=6009: runs the server in Node's Inspector mode so VS Code can attach to the server for debugging. // By setting `process.env.DEBUG_BREAK` to a truthy value, the language server will wait until a debugger is attached. @@ -36,7 +36,7 @@ const startLanguageClient = function (context: vscode.ExtensionContext): Languag debug: { module: serverModule, transport: TransportKind.ipc, options: debugOptions }, }; - const fileSystemWatcher = vscode.workspace.createFileSystemWatcher('**/*.{sdspipe,sdsschema,sdsstub,sdstest}'); + const fileSystemWatcher = vscode.workspace.createFileSystemWatcher('**/*.{sdspipe,sdsstub,sdstest}'); context.subscriptions.push(fileSystemWatcher); // Options to control the language client diff --git a/DSL-langium/src/language-server/constant/fileExtensions.ts b/DSL-langium/src/language-server/constant/fileExtensions.ts index 521a09d7b..407522a2c 100644 --- a/DSL-langium/src/language-server/constant/fileExtensions.ts +++ b/DSL-langium/src/language-server/constant/fileExtensions.ts @@ -8,14 +8,6 @@ import { AstNode, getDocument, LangiumDocument } from 'langium'; */ export const PIPELINE_FILE_EXTENSION = 'sdspipe'; -/** - * Marks the file as a schema file. - * - * @see isInSchemaFile - * @see isSchemaFile - */ -export const SCHEMA_FILE_EXTENSION = 'sdsschema'; - /** * Marks the file as a stub file, which describes an external API. * @@ -36,22 +28,13 @@ export const TEST_FILE_EXTENSION = 'sdstest'; /** * All file extensions that are supported by the Safe-DS language. */ -export type SdSFileExtension = - | typeof PIPELINE_FILE_EXTENSION - | typeof SCHEMA_FILE_EXTENSION - | typeof STUB_FILE_EXTENSION - | typeof TEST_FILE_EXTENSION; +export type SdSFileExtension = typeof PIPELINE_FILE_EXTENSION | typeof STUB_FILE_EXTENSION | typeof TEST_FILE_EXTENSION; /** * Returns whether the object is contained in a pipeline file. */ export const isInPipelineFile = (node: AstNode) => isPipelineFile(getDocument(node)); -/** - * Returns whether the object is contained in a schema file. - */ -export const isInSchemaFile = (node: AstNode) => isSchemaFile(getDocument(node)); - /** * Returns whether the object is contained in a stub file. */ @@ -67,11 +50,6 @@ export const isInTestFile = (node: AstNode) => isTestFile(getDocument(node)); */ export const isPipelineFile = (document: LangiumDocument) => hasExtension(document, PIPELINE_FILE_EXTENSION); -/** - * Returns whether the resource represents a schema file. - */ -export const isSchemaFile = (document: LangiumDocument) => hasExtension(document, SCHEMA_FILE_EXTENSION); - /** * Returns whether the resource represents a stub file. */ diff --git a/DSL-langium/src/language-server/grammar/safe-ds.langium b/DSL-langium/src/language-server/grammar/safe-ds.langium index 42089e989..a39928e67 100644 --- a/DSL-langium/src/language-server/grammar/safe-ds.langium +++ b/DSL-langium/src/language-server/grammar/safe-ds.langium @@ -1,26 +1,64 @@ grammar SafeDs -interface SdsModule { - name: string; +// ----------------------------------------------------------------------------- +// Base interfaces +// ----------------------------------------------------------------------------- + +interface SdsObject {} + +interface SdsAnnotatedObject extends SdsObject { + annotationCalls?: SdsAnnotationCall[] +} + +interface SdsAbstractCall extends SdsObject { + argumentList: SdsArgumentList +} + +interface SdsDeclaration extends SdsAnnotatedObject, SdsObject { + annotationCallList?: SdsAnnotationCallList + name: string +} + +interface SdsLocalVariable extends SdsDeclaration, SdsObject {} + + +// ----------------------------------------------------------------------------- +// Module +// ----------------------------------------------------------------------------- + +interface SdsModule extends SdsDeclaration { imports: SdsImport[]; + members: SdsAnnotatedObject[] } entry SdsModule returns SdsModule: {SdsModule} - ('package' name=QualifiedName)? - imports+=SdsImport* + annotationCalls+=SdsAnnotationCall* + ( + ('package' name=QualifiedName) + imports+=SdsImport* + members+=(SdsAnnotatedModuleMember | SdsUnannotatedModuleMember)* + + | imports+=SdsImport+ + members+=(SdsAnnotatedModuleMember | SdsUnannotatedModuleMember)* + + | members+=SdsUnannotatedModuleMember + members+=(SdsAnnotatedModuleMember | SdsUnannotatedModuleMember)* + )? ; -interface SdsImport { +interface SdsImport extends SdsObject { importedNamespace: string; - alias: SdsImportAlias; + alias?: SdsImportAlias; } SdsImport returns SdsImport: - 'import' importedNamespace=QualifiedNameWithWildcard alias=SdsImportAlias ? + 'import' + importedNamespace=QualifiedNameWithWildcard + alias=SdsImportAlias? ; -interface SdsImportAlias { +interface SdsImportAlias extends SdsObject { name: string; } @@ -28,17 +66,1146 @@ SdsImportAlias returns SdsImportAlias: 'as' name=ID ; +QualifiedNameWithWildcard returns string: + ID ('.' ID)* ('.' '*')? +; + QualifiedName returns string: - ID ('.' ID )* + ID ('.' ID)* ; -QualifiedNameWithWildcard returns string: - QualifiedName ('.' '*' )? + +// ----------------------------------------------------------------------------- +// Declarations +// ----------------------------------------------------------------------------- + +interface SdsModuleMember extends SdsDeclaration, SdsObject {} + +SdsAnnotatedModuleMember returns SdsAnnotatedObject: + {SdsAnnotationCallList} + annotationCalls+=SdsAnnotationCall+ + ( + {SdsAnnotation.annotationCallList=current} + SdsAnnotationFragment + + | {SdsClass.annotationCallList=current} + SdsClassFragment + + | {SdsEnum.annotationCallList=current} + SdsEnumFragment + + | {SdsFunction.annotationCallList=current} + SdsFunctionFragment + + | {SdsSchema.annotationCallList=current} + SdsSchemaFragment + + | {SdsPipeline.annotationCallList=current} + SdsPipelineFragment + + | {SdsStep.annotationCallList=current} + SdsStepFragment + ) +; + +SdsUnannotatedModuleMember returns SdsAnnotatedObject: + {SdsAnnotation} + SdsAnnotationFragment + + | {SdsClass} + SdsClassFragment + + | {SdsEnum} + SdsEnumFragment + + | {SdsFunction} + SdsFunctionFragment + + | {SdsSchema} + SdsSchemaFragment + + | {SdsPipeline} + SdsPipelineFragment + + | {SdsStep} + SdsStepFragment +; + +interface SdsAnnotation extends SdsCallable, SdsModuleMember { + constraintList?: SdsConstraintList +} + +fragment SdsAnnotationFragment: + 'annotation' name=ID + parameterList=SdsParameterList? + constraintList=SdsConstraintList? +; + +interface SdsClass extends SdsCallable, SdsClassMember, SdsModuleMember, SdsNamedTypeDeclaration { + typeParameterList?: SdsTypeParameterList + parentTypeList?: SdsParentTypeList + constraintList?: SdsConstraintList + body?: SdsClassBody +} + +fragment SdsClassFragment: + 'class' + name=ID + typeParameterList=SdsTypeParameterList? + parameterList=SdsParameterList? + parentTypeList=SdsParentTypeList? + constraintList=SdsConstraintList? + body=SdsClassBody? +; + +interface SdsParentTypeList extends SdsObject { + parentTypes: SdsType[] +} + +SdsParentTypeList returns SdsParentTypeList: + 'sub' + parentTypes+=SdsParentType + (',' parentTypes+=SdsParentType)* + ','? +; + +interface SdsClassBody extends SdsObject { + members: SdsObject[] +} + +SdsClassBody returns SdsClassBody: + {SdsClassBody} '{' members+=SdsClassMember* '}' +; + +interface SdsClassMember extends SdsDeclaration, SdsObject {} + +SdsClassMember returns SdsObject: + SdsAnnotatedClassMember + | SdsUnannotatedClassMember + | SdsProtocol +; + +SdsAnnotatedClassMember returns SdsAnnotatedObject: + {SdsAnnotationCallList} + annotationCalls+=SdsAnnotationCall+ + ( + {SdsAttribute.annotationCallList=current} + SdsAttributeFragment + + | {SdsClass.annotationCallList=current} + SdsClassFragment + + | {SdsEnum.annotationCallList=current} + SdsEnumFragment + + | {SdsFunction.annotationCallList=current} + static?='static'? + SdsFunctionFragment + ) +; + +SdsUnannotatedClassMember returns SdsAnnotatedObject: + {SdsAttribute} + SdsAttributeFragment + + | {SdsClass} + SdsClassFragment + + | {SdsEnum} + SdsEnumFragment + + | {SdsFunction} + static?='static'? + SdsFunctionFragment +; + +interface SdsAttribute extends SdsClassMember, SdsProtocolToken { + static: boolean + ^type?: SdsType +} + +fragment SdsAttributeFragment: + static?='static'? + 'attr' + name=ID + (':' ^type=SdsType)? +; + +interface SdsEnum extends SdsNamedTypeDeclaration, SdsClassMember, SdsModuleMember { + body?: SdsEnumBody +} + +fragment SdsEnumFragment: + 'enum' + name=ID + body=SdsEnumBody? +; + +interface SdsEnumBody extends SdsObject { + variants: SdsEnumVariant[] +} + +SdsEnumBody returns SdsEnumBody: + {SdsEnumBody} '{' variants+=SdsEnumVariant * '}' +; + +interface SdsEnumVariant extends SdsCallable, SdsNamedTypeDeclaration { + typeParameterList?: SdsTypeParameterList + constraintList?: SdsConstraintList +} + +SdsEnumVariant returns SdsEnumVariant: + annotationCalls+=SdsAnnotationCall* + name=ID + typeParameterList=SdsTypeParameterList? + parameterList=SdsParameterList? + constraintList=SdsConstraintList? +; + +interface SdsFunction extends SdsCallable, SdsClassMember, SdsModuleMember, SdsProtocolToken { + static: boolean + typeParameterList?: SdsTypeParameterList + resultList?: SdsResultList + constraintList?: SdsConstraintList +} + +fragment SdsFunctionFragment: + 'fun' + name=ID + typeParameterList=SdsTypeParameterList? + parameterList=SdsParameterList + resultList=SdsResultList? + constraintList=SdsConstraintList? +; + +interface SdsPipeline extends SdsModuleMember { + body: SdsBlock +} + +fragment SdsPipelineFragment: + 'pipeline' + name=ID + body=SdsBlock +; + +interface SdsStep extends SdsCallable, SdsModuleMember { + visibility?: string + resultList?: SdsResultList + body: SdsBlock +} + +fragment SdsStepFragment: + visibility=('internal' | 'private')? + 'step' + name=ID + parameterList=SdsParameterList + resultList=SdsResultList? + body=SdsBlock +; + + +// ----------------------------------------------------------------------------- +// Annotation calls +// ----------------------------------------------------------------------------- + +interface SdsAnnotationCallList extends SdsAnnotatedObject {} + +interface SdsAnnotationCall extends SdsAbstractCall { + annotation?: @SdsAnnotation +} + +SdsAnnotationCall returns SdsAnnotationCall: + '@' annotation=[SdsAnnotation:ID] argumentList=SdsAnnotationCallArgumentList? +; + +SdsAnnotationCallArgumentList returns SdsArgumentList: + {SdsArgumentList} '(' (arguments+=SdsAnnotationCallArgument (',' arguments+=SdsAnnotationCallArgument )* ','? )? ')' +; + +SdsAnnotationCallArgument returns SdsArgument: + (parameter=[SdsParameter:ID ] '=')? value=SdsExpression +; + + +// ----------------------------------------------------------------------------- +// Constraints +// ----------------------------------------------------------------------------- + +interface SdsConstraintList extends SdsObject { + constraints: SdsConstraint[] +} + +SdsConstraintList returns SdsConstraintList: + 'where' + '{' + ( + constraints+=SdsConstraint + (',' constraints+=SdsConstraint)* + ','? + )? + '}' ; +interface SdsConstraint extends SdsObject {} -terminal ID returns string:IDENTIFIER | '`' IDENTIFIER '`' ; -terminal IDENTIFIER returns string: /[_a-zA-Z][_a-zA-Z0-9]*/; +SdsConstraint returns SdsConstraint: + SdsTypeParameterConstraint +; + +interface SdsTypeParameterConstraint extends SdsConstraint { + leftOperand: @SdsTypeParameter + operator: string + rightOperand: SdsType +} + +SdsTypeParameterConstraint returns SdsTypeParameterConstraint: + leftOperand=[SdsTypeParameter:ID] + operator=SdsTypeParameterConstraintOperator + rightOperand=SdsType +; + +SdsTypeParameterConstraintOperator returns string: + 'sub' | 'super' +; + + +// ----------------------------------------------------------------------------- +// Callables, parameters, and results +// ----------------------------------------------------------------------------- + +interface SdsCallable extends SdsObject { + parameterList: SdsParameterList +} + +interface SdsParameterList extends SdsObject { + parameters: SdsParameter[] +} + +SdsParameterList returns SdsParameterList: + {SdsParameterList} + '(' + ( + parameters+=SdsParameter + (',' parameters+=SdsParameter)* + ','? + )? + ')' +; + +interface SdsLambdaParameterList extends SdsExpression, SdsParameterList {} + +SdsLambdaParameterList returns SdsParameterList: + {SdsLambdaParameterList} + '(' + ( + parameters+=SdsParameter + (',' parameters+=SdsParameter)* + ','? + )? + ')' +; + +interface SdsParameter extends SdsLocalVariable { + variadic: boolean + ^type?: SdsType + defaultValue?: SdsExpression +} + +SdsParameter returns SdsParameter: + annotationCalls+=SdsAnnotationCall* + variadic?='vararg'? + name=ID + (':' ^type=SdsType)? + ('=' defaultValue=SdsExpression)? +; + +interface SdsResultList extends SdsObject { + results: SdsResult[] +} + +SdsResultList returns SdsResultList: + {SdsResultList} '->' results+=SdsResult + | {SdsResultList} '->' '(' (results+=SdsResult (',' results+=SdsResult)* ','? )? ')' +; + +interface SdsAbstractResult extends SdsDeclaration, SdsObject {} + +interface SdsResult extends SdsAbstractResult { + ^type?: SdsType +} + +SdsResult returns SdsResult: + annotationCalls+=SdsAnnotationCall* + name=ID + (':' ^type=SdsType)? +; + + +// ----------------------------------------------------------------------------- +// Statements +// ----------------------------------------------------------------------------- + +interface SdsStatement extends SdsObject {} + +interface SdsBlock extends SdsObject { + statements: SdsStatement[] +} + +SdsBlock returns SdsBlock: + {SdsBlock} '{' statements+=SdsStatement* '}' +; + +SdsStatement returns SdsStatement: + SdsAssignment + | SdsExpressionStatement +; + +interface SdsAssignment extends SdsStatement { + assigneeList?: SdsAssigneeList + expression?: SdsExpression +} + +SdsAssignment returns SdsAssignment: + assigneeList=SdsAssigneeList '=' expression=SdsExpression ';' +; + +interface SdsAssigneeList extends SdsObject { + assignees: SdsAssignee[] +} + +SdsAssigneeList returns SdsAssigneeList: + assignees+=SdsAssignee (',' assignees+=SdsAssignee )* ','? +; + +interface SdsAssignee extends SdsObject {} + +interface SdsPlaceholder extends SdsAssignee, SdsLocalVariable {} + +interface SdsWildcard extends SdsAssignee {} + +interface SdsYield extends SdsAssignee { + result?: @SdsResult +} + +SdsAssignee returns SdsAssignee: + {SdsPlaceholder} 'val' name=ID + | {SdsWildcard} '_' + | {SdsYield} 'yield' result=[SdsResult:ID] +; + +interface SdsExpressionStatement extends SdsStatement { + expression: SdsExpression +} + +SdsExpressionStatement returns SdsExpressionStatement: + expression=SdsExpression ';' +; + + +// ----------------------------------------------------------------------------- +// Expressions +// ----------------------------------------------------------------------------- + +interface SdsExpression extends SdsObject {} + +SdsExpression returns SdsExpression: + SdsLambda | SdsOrExpression +; + +interface SdsLambda extends SdsCallable, SdsExpression {} + +interface SdsBlockLambda extends SdsLambda { + body: SdsBlock +} + +interface SdsExpressionLambda extends SdsLambda { + result: SdsExpression +} + +SdsLambda returns SdsExpression: + SdsLambdaParameterList + ( + {SdsBlockLambda.parameterList=current} body=SdsBlockLambdaBlock + | {SdsExpressionLambda.parameterList=current} '->' result=SdsExpression + ) +; + +SdsBlockLambdaBlock returns SdsBlock: + {SdsBlock} '{' statements+=SdsBlockLambdaStatement* '}' +; + +SdsBlockLambdaStatement returns SdsStatement: + SdsBlockLambdaAssignment | SdsExpressionStatement +; + +SdsBlockLambdaAssignment returns SdsAssignment: + assigneeList=SdsBlockLambdaAssigneeList '=' expression=SdsExpression ';' +; + +SdsBlockLambdaAssigneeList returns SdsAssigneeList: + assignees+=SdsBlockLambdaAssignee (',' assignees+=SdsBlockLambdaAssignee )* ','? +; + +interface SdsBlockLambdaResult extends SdsAssignee, SdsAbstractResult {} + +SdsBlockLambdaAssignee returns SdsAssignee: + {SdsWildcard} '_' + | {SdsPlaceholder} 'val' name=ID + | {SdsBlockLambdaResult} 'yield' name=ID +; + +interface SdsInfixOperation extends SdsExpression { + leftOperand: SdsExpression + operator: string + rightOperand: SdsExpression +} + +interface SdsPrefixOperation extends SdsExpression { + operand: SdsExpression + operator: string +} + +SdsOrExpression returns SdsExpression: + SdsAndExpression + ( + {SdsInfixOperation.leftOperand=current} + operator='or' + rightOperand=SdsAndExpression + )* +; + +SdsAndExpression returns SdsExpression: + SdsNotExpression + ( + {SdsInfixOperation.leftOperand=current} + operator='and' + rightOperand=SdsNotExpression + )* +; + +SdsNotExpression returns SdsExpression: + {SdsPrefixOperation} operator='not' operand=SdsNotExpression + | SdsEqualityExpression +; + +SdsEqualityExpression returns SdsExpression: + SdsComparisonExpression + ( + {SdsInfixOperation.leftOperand=current} + operator=SdsEqualityOperator + rightOperand=SdsComparisonExpression + )? +; + +SdsEqualityOperator returns string: + '==' | '!=' | '===' | '!==' +; + +SdsComparisonExpression returns SdsExpression: + SdsAdditiveExpression + ( + {SdsInfixOperation.leftOperand=current} + operator=SdsComparisonOperator + rightOperand=SdsAdditiveExpression + )? +; + +SdsComparisonOperator returns string: + LESS_THAN | '<=' | '>=' | '>' +; + +SdsAdditiveExpression returns SdsExpression: + SdsMultiplicativeExpression + ( + {SdsInfixOperation.leftOperand=current} + operator=SdsAdditiveOperator + rightOperand=SdsMultiplicativeExpression + )* +; + +SdsAdditiveOperator returns string: + '+' | '-' +; + +SdsMultiplicativeExpression returns SdsExpression: + SdsElvisExpression + ( + {SdsInfixOperation.leftOperand=current} + operator=SdsMultiplicativeOperator + rightOperand=SdsElvisExpression + )* +; + +SdsMultiplicativeOperator returns string: + '*' | '/' +; + +SdsElvisExpression returns SdsExpression: + SdsUnaryOperation + ( + {SdsInfixOperation.leftOperand=current} + operator='?:' + rightOperand=SdsUnaryOperation + )* +; + +SdsUnaryOperation returns SdsExpression: + {SdsPrefixOperation} operator='-' operand=SdsUnaryOperation + | SdsChainedExpression +; + +interface SdsChainedExpression extends SdsExpression { + receiver: SdsExpression +} + +interface SdsCall extends SdsAbstractCall, SdsChainedExpression { + typeArgumentList?: SdsTypeArgumentList +} + +interface SdsIndexedAccess extends SdsChainedExpression { + index: SdsExpression +} + +interface SdsMemberAccess extends SdsChainedExpression { + nullSafe: boolean + member: SdsReference +} + +SdsChainedExpression returns SdsExpression: + SdsPrimaryExpression + ( + {SdsCall.receiver=current} + typeArgumentList=SdsCallTypeArgumentList? + argumentList=SdsCallArgumentList + + | {SdsIndexedAccess.receiver=current} + '[' index=SdsExpression ']' + + | {SdsMemberAccess.receiver=current} + (nullSafe?='?')? + '.' + member=SdsReference* + )* +; + +interface SdsArgumentList extends SdsObject { + arguments: SdsArgument[] +} + +SdsCallArgumentList returns SdsArgumentList: + {SdsArgumentList} + '(' + ( + arguments+=SdsCallArgument + (',' arguments+=SdsCallArgument)* + ','? + )? + ')' +; + +interface SdsArgument extends SdsExpression { + parameter?: @SdsParameter + value: SdsExpression +} + +SdsCallArgument returns SdsArgument: + (parameter=[SdsParameter:ID] '=')? value=SdsExpression +; + +SdsPrimaryExpression returns SdsExpression: + SdsLiteral + | SdsParenthesizedExpression + | SdsReference + | SdsTemplateString +; + +interface SdsLiteral extends SdsExpression {} + +SdsLiteral returns SdsLiteral: + SdsBoolean + | SdsFloat + | SdsInt + | SdsNull + | SdsString +; + +interface SdsBoolean extends SdsLiteral { + value: boolean +} + +SdsBoolean returns SdsBoolean: + value?='true' + | {SdsBoolean} 'false' +; + +interface SdsNumber extends SdsLiteral, SdsExpression {} + +interface SdsFloat extends SdsNumber { + value: number +} + +SdsFloat returns SdsFloat: + value=FLOAT +; + +interface SdsInt extends SdsNumber { + value: number +} + +SdsInt returns SdsInt: + value=INT +; + +interface SdsNull extends SdsLiteral {} + +SdsNull returns SdsNull: + {SdsNull} 'null' +; + +interface SdsString extends SdsLiteral { + value: string +} + +SdsString returns SdsString: + value=STRING +; + +interface SdsReference extends SdsExpression { + declaration?: @SdsDeclaration +} + +SdsReference returns SdsReference: + declaration=[SdsDeclaration:ID] +; + +interface SdsParenthesizedExpression extends SdsExpression { + expression: SdsExpression +} + +SdsParenthesizedExpression returns SdsParenthesizedExpression: + '(' expression=SdsExpression ')' +; + +interface SdsTemplateString extends SdsExpression { + expressions: SdsExpression[] +} + +SdsTemplateString returns SdsTemplateString: + expressions+=SdsTemplateStringStart + expressions+=SdsExpression? + (expressions+=SdsTemplateStringInner expressions+=SdsExpression?)* + expressions+=SdsTemplateStringEnd +; + +interface SdsTemplateStringPart extends SdsExpression, SdsLiteral { + value: string +} + +interface SdsTemplateStringStart extends SdsTemplateStringPart {} + +SdsTemplateStringStart returns SdsExpression: + {SdsTemplateStringStart} + value=TEMPLATE_STRING_START +; + +interface SdsTemplateStringInner extends SdsTemplateStringPart {} + +SdsTemplateStringInner returns SdsExpression: + {SdsTemplateStringInner} + value=TEMPLATE_STRING_INNER +; + +interface SdsTemplateStringEnd extends SdsTemplateStringPart {} + +SdsTemplateStringEnd returns SdsExpression: + {SdsTemplateStringEnd} + value=TEMPLATE_STRING_END +; + + +// ----------------------------------------------------------------------------- +// Types +// ----------------------------------------------------------------------------- + +interface SdsType extends SdsObject {} + +interface SdsNamedTypeDeclaration extends SdsDeclaration, SdsObject {} + +interface SdsMemberType extends SdsType { + member: SdsNamedType + receiver: SdsType +} + +SdsType returns SdsType: + SdsPrimaryType ({SdsMemberType.receiver=current} '.' member=SdsNamedType)* +; + +SdsPrimaryType returns SdsType: + SdsCallableType + | SdsNamedType + | SdsUnionType +; + +interface SdsCallableType extends SdsCallable, SdsType { + resultList: SdsResultList +} + +SdsCallableType returns SdsCallableType: + parameterList=SdsParameterList + resultList=SdsResultList +; + +interface SdsNamedType extends SdsType { + declaration: @SdsNamedTypeDeclaration + typeArgumentList?: SdsTypeArgumentList + nullable: boolean +} + +SdsNamedType returns SdsNamedType: + declaration=[SdsNamedTypeDeclaration:ID] + typeArgumentList=SdsTypeArgumentList? + (nullable?='?' )? +; + +interface SdsUnionType extends SdsType { + typeArgumentList: SdsTypeArgumentList +} + +SdsUnionType returns SdsUnionType: + 'union' typeArgumentList=SdsUnionTypeArgumentList +; + +SdsUnionTypeArgumentList returns SdsTypeArgumentList: + {SdsTypeArgumentList} + (LESS_THAN | CALL_TYPE_ARGUMENT_LIST_START) + ( + typeArguments+=SdsUnionTypeArgument + (',' typeArguments+=SdsUnionTypeArgument)* + ','? + )? + '>' +; + +SdsUnionTypeArgument returns SdsTypeArgument: + value=SdsUnionTypeArgumentValue +; + +SdsUnionTypeArgumentValue returns SdsTypeArgumentValue: + {SdsTypeProjection} ^type=SdsType +; + +SdsParentType returns SdsType: + SdsNamedType ({SdsMemberType.receiver=current} '.' member=SdsNamedType)* +; + +interface SdsTypeParameterList extends SdsObject { + typeParameters: SdsTypeParameter[] +} + +SdsTypeParameterList returns SdsTypeParameterList: + {SdsTypeParameterList} + (LESS_THAN | CALL_TYPE_ARGUMENT_LIST_START) + ( + typeParameters+=SdsTypeParameter + (',' typeParameters+=SdsTypeParameter)* + ','? + )? + '>' +; + +interface SdsTypeParameter extends SdsNamedTypeDeclaration { + variance?: string +} + +SdsTypeParameter returns SdsTypeParameter: + annotationCalls+=SdsAnnotationCall* + variance=SdsTypeParameterVariance? + name=ID +; + +SdsTypeParameterVariance returns string: + 'in' | 'out' +; + +interface SdsTypeArgumentList extends SdsObject { + typeArguments: SdsTypeArgument[] +} + +SdsTypeArgumentList returns SdsTypeArgumentList: + {SdsTypeArgumentList} + (LESS_THAN | CALL_TYPE_ARGUMENT_LIST_START) + (typeArguments+=SdsTypeArgument (',' typeArguments+=SdsTypeArgument)* ','? )? + '>' +; + +SdsCallTypeArgumentList returns SdsTypeArgumentList: + {SdsTypeArgumentList} + CALL_TYPE_ARGUMENT_LIST_START + (typeArguments+=SdsTypeArgument (',' typeArguments+=SdsTypeArgument)* ','? )? + '>' +; + +interface SdsTypeArgument extends SdsObject { + typeParameter?: @SdsTypeParameter + value: SdsTypeArgumentValue +} + +SdsTypeArgument returns SdsTypeArgument: + (typeParameter=[SdsTypeParameter:ID] '=' )? + value=SdsTypeArgumentValue +; + +interface SdsTypeArgumentValue extends SdsObject {} + +interface SdsStarProjection extends SdsTypeArgumentValue {} + +interface SdsTypeProjection extends SdsTypeArgumentValue { + variance?: string + ^type: SdsType +} + +SdsTypeArgumentValue returns SdsTypeArgumentValue: + {SdsStarProjection} '*' + | {SdsTypeProjection} variance=SdsTypeParameterVariance? ^type=SdsType +; + + +// ----------------------------------------------------------------------------- +// Schemas +// ----------------------------------------------------------------------------- + +interface SdsSchema extends SdsModuleMember { + columnList: SdsColumnList +} + +fragment SdsSchemaFragment: + 'schema' + name=ID + columnList=SdsColumnList +; + +interface SdsColumnList extends SdsObject { + columns: SdsColumn[] +} + +SdsColumnList returns SdsColumnList: + {SdsColumnList} '{' (columns+=SdsColumn (',' columns+=SdsColumn )* ','? )? '}' +; + +interface SdsColumn extends SdsObject { + columnName: SdsString + columnType: SdsType +} + +SdsColumn returns SdsColumn: + columnName=SdsString ":" columnType=SdsType +; + + +// ----------------------------------------------------------------------------- +// Behavior protocols +// ----------------------------------------------------------------------------- + +interface SdsProtocol extends SdsObject { + body: SdsProtocolBody +} + +SdsProtocol returns SdsProtocol: + 'protocol' body=SdsProtocolBody +; + +interface SdsProtocolBody extends SdsObject { + subtermList?: SdsProtocolSubtermList + term?: SdsProtocolTerm +} + +SdsProtocolBody returns SdsProtocolBody: + {SdsProtocolBody} + '{' + subtermList=SdsProtocolSubtermList? + term=SdsProtocolTerm? + '}' +; + +interface SdsProtocolSubtermList extends SdsObject { + subterms: SdsProtocolSubterm[] +} + +SdsProtocolSubtermList returns SdsProtocolSubtermList: + subterms+=SdsProtocolSubterm+ +; + +interface SdsProtocolToken extends SdsDeclaration, SdsObject {} + +interface SdsProtocolSubterm extends SdsProtocolToken { + term?: SdsProtocolTerm +} + +SdsProtocolSubterm returns SdsProtocolSubterm: + 'subterm' + name=ID + '=' + term=SdsProtocolTerm + ';' +; + +interface SdsProtocolTerm extends SdsObject {} + +SdsProtocolTerm returns SdsProtocolTerm: + SdsProtocolAlternative +; + +interface SdsProtocolAlternative extends SdsProtocolTerm { + terms: SdsProtocolTerm[] +} + +SdsProtocolAlternative returns SdsProtocolTerm: + SdsProtocolSequence + ( + {SdsProtocolAlternative.terms+=current} + '|' + terms+=SdsProtocolSequence + ('|' terms+=SdsProtocolSequence)* + )? +; + +interface SdsProtocolSequence extends SdsProtocolTerm { + terms: SdsProtocolTerm[] +} + +SdsProtocolSequence returns SdsProtocolTerm: + SdsProtocolQuantifiedTerm + ( + {SdsProtocolSequence.terms+=current} + terms+=SdsProtocolQuantifiedTerm + (terms+=SdsProtocolQuantifiedTerm)* + )? +; + +interface SdsProtocolQuantifiedTerm extends SdsProtocolTerm { + term: SdsProtocolTerm + quantifier: string +} + +SdsProtocolQuantifiedTerm returns SdsProtocolTerm: + SdsProtocolPrimaryElement + ( + {SdsProtocolQuantifiedTerm.term=current} + quantifier=SdsProtocolQuantifier + )? +; + +SdsProtocolQuantifier returns string: + '?' | '*' | '+' +; + +SdsProtocolPrimaryElement returns SdsProtocolTerm: + SdsProtocolComplement + | SdsProtocolReference + | SdsProtocolTokenClass + | SdsProtocolParenthesizedTerm +; + +interface SdsProtocolComplement extends SdsProtocolTerm { + universe?: SdsProtocolTokenClass + referenceList?: SdsProtocolReferenceList +} + +SdsProtocolComplement returns SdsProtocolComplement: + {SdsProtocolComplement} + '[' + universe=SdsProtocolTokenClass? + '^' + referenceList=SdsProtocolReferenceList? + ']' +; + +interface SdsProtocolReferenceList extends SdsProtocolTerm { + references: SdsProtocolReference[] +} + +SdsProtocolReferenceList returns SdsProtocolReferenceList: + references+=SdsProtocolReference+ +; + +interface SdsProtocolReference extends SdsProtocolTerm { + token: @SdsProtocolToken +} + +SdsProtocolReference returns SdsProtocolReference: + token=[SdsProtocolToken:ID] +; + +interface SdsProtocolTokenClass extends SdsProtocolTerm { + value: string +} + +SdsProtocolTokenClass returns SdsProtocolTokenClass: + value=SdsProtocolTokenClassValue +; + +SdsProtocolTokenClassValue returns string: + '.' | '\\a' | '\\f' +; + +interface SdsProtocolParenthesizedTerm extends SdsProtocolTerm { + term: SdsProtocolTerm +} + +SdsProtocolParenthesizedTerm returns SdsProtocolParenthesizedTerm: + '(' term=SdsProtocolTerm ')' +; + + +// ----------------------------------------------------------------------------- +// Terminals +// ----------------------------------------------------------------------------- + +terminal ID returns string: IDENTIFIER | '`' IDENTIFIER '`'; +terminal fragment IDENTIFIER: /[_a-zA-Z][_a-zA-Z0-9]*/; + +terminal FLOAT returns number + : DECIMAL_DIGIT+ '.' DECIMAL_DIGIT+ FLOAT_EXPONENT? + | DECIMAL_DIGIT+ FLOAT_EXPONENT; +terminal fragment DECIMAL_DIGIT: /[0-9]/; +terminal fragment FLOAT_EXPONENT: ('e' | 'E' )('+' | '-' )? DECIMAL_DIGIT+; +terminal INT returns number: DECIMAL_DIGIT+; +terminal STRING returns string: STRING_START STRING_TEXT* STRING_END; +terminal fragment STRING_START: STRING_DELIMITER; +terminal fragment STRING_END: '{'? STRING_DELIMITER; +terminal fragment STRING_DELIMITER: '"'; +terminal fragment STRING_TEXT + : '{'? ESCAPE_SEQUENCE + | /{?[^\\"{]/ +; +terminal fragment ESCAPE_SEQUENCE: '\\' .; +terminal fragment TEMPLATE_EXPRESSION_START: '{{'; +terminal fragment TEMPLATE_EXPRESSION_END: '}}'; +terminal TEMPLATE_STRING_START returns string: STRING_START STRING_TEXT* TEMPLATE_EXPRESSION_START; +terminal TEMPLATE_STRING_INNER returns string: TEMPLATE_EXPRESSION_END STRING_TEXT* TEMPLATE_EXPRESSION_START; +terminal TEMPLATE_STRING_END returns string: TEMPLATE_EXPRESSION_END STRING_TEXT* STRING_END; + +// Resolves the ambiguity between the less than operator (<) and the start of a type argument list of a call (<). +// See also: https://github.com/langium/langium/discussions/921#discussioncomment-4943180 +terminal CALL_TYPE_ARGUMENT_LIST_START: + '<' + (?= + /\s*/ + ( '*' // Star projection as positional type argument + | 'in' // Contravariant type projection as positional type argument + | 'out' // Covariant type projection as positional type argument + | 'union' // Invariant union type as positional type argument + | '>' // Empty type argument list + | ID /\s*/ + ( '=' // Named type argument + | ('.' /\s*/ ID /\s*/)* (',' | '>') // Invariant type projection as positional type argument + ) + ) + ) +; +terminal LESS_THAN: + '<' +; hidden terminal ML_COMMENT: /\/\*[\s\S]*?\*\//; hidden terminal SL_COMMENT: /\/\/[^\n\r]*/; diff --git a/DSL-langium/src/language-server/main.ts b/DSL-langium/src/language-server/main.ts index 787e6b18b..2669ef6ef 100644 --- a/DSL-langium/src/language-server/main.ts +++ b/DSL-langium/src/language-server/main.ts @@ -7,6 +7,7 @@ import { createSafeDsServices } from './safe-ds-module'; const connection = createConnection(ProposedFeatures.all); // Inject the shared services and language-specific services +// @ts-ignore const { shared } = createSafeDsServices({ connection, ...NodeFileSystem }); // Start the language server with the shared services diff --git a/DSL-langium/syntaxes/safe-ds.tmLanguage.json b/DSL-langium/syntaxes/safe-ds.tmLanguage.json deleted file mode 100644 index 6e4642432..000000000 --- a/DSL-langium/syntaxes/safe-ds.tmLanguage.json +++ /dev/null @@ -1,60 +0,0 @@ -{ - "name": "safe-ds", - "scopeName": "source.safe-ds", - "fileTypes": [".sdspipe", ".sdsschema", ".sdsstub", ".sdstest"], - "patterns": [ - { - "include": "#comments" - }, - { - "name": "keyword.control.safe-ds", - "match": "\\b(as|import|package)\\b" - } - ], - "repository": { - "comments": { - "patterns": [ - { - "name": "comment.block.safe-ds", - "begin": "/\\*", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.safe-ds" - } - }, - "end": "\\*/", - "endCaptures": { - "0": { - "name": "punctuation.definition.comment.safe-ds" - } - } - }, - { - "begin": "//", - "beginCaptures": { - "1": { - "name": "punctuation.whitespace.comment.leading.safe-ds" - } - }, - "end": "(?=$)", - "name": "comment.line.safe-ds" - }, - { - "name": "comment.block.safe-ds", - "begin": "[»«]", - "beginCaptures": { - "0": { - "name": "punctuation.definition.comment.safe-ds" - } - }, - "end": "[»«]", - "endCaptures": { - "0": { - "name": "punctuation.definition.comment.safe-ds" - } - } - } - ] - } - } -} diff --git a/DSL-langium/tests/grammar/IssueFinderTest.kt b/DSL-langium/tests/grammar/IssueFinderTest.kt deleted file mode 100644 index 7f8e3ce8f..000000000 --- a/DSL-langium/tests/grammar/IssueFinderTest.kt +++ /dev/null @@ -1,163 +0,0 @@ -// class IssueFinderTest { -// -// @com.google.inject.Inject -// private lateinit var parseHelper: com.larsreimann.safeds.testing.ParseHelper -// -// @com.google.inject.Inject -// private lateinit var validationHelper: org.eclipse.xtext.testing.validation.ValidationTestHelper -// -// @org.junit.jupiter.api.TestFactory -// fun `should parse test files correctly`(): java.util.stream.Stream { -// return javaClass.classLoader -// .getResourcePath("grammar") -// ?.createDynamicTestsFromResourceFolder(::validateTestFile, ::createTest) -// ?: java.util.stream.Stream.empty() -// } -// -// @org.junit.jupiter.api.TestFactory -// fun `should validate test files correctly`(): java.util.stream.Stream { -// return javaClass.classLoader -// .getResourcePath("validation") -// ?.createDynamicTestsFromResourceFolder(::validateTestFile, ::createTest) -// ?: java.util.stream.Stream.empty() -// } -// -// /** -// * Checks if the given program is a valid test. If there are issues a description of the issue is returned, -// * otherwise this returns `null`. -// */ -// private fun validateTestFile( -// @Suppress("UNUSED_PARAMETER") resourcePath: java.nio.file.Path, -// filePath: java.nio.file.Path, -// program: String -// ): String? { -// val severities = severities(program) -// -// // Must contain at least one severity -// if (severities.isEmpty()) { -// return "No expected issue is specified." -// } -// -// // Severities must be valid -// severities.forEach { -// if (it !in com.larsreimann.safeds.validSeverities) { -// return "Severity '$it' is invalid." -// } -// } -// -// // Opening and closing test markers must match -// val locations = when (val locationsResult = com.larsreimann.safeds.testing.findTestRanges(program)) { -// is com.larsreimann.safeds.testing.FindTestRangesResult.Success -> locationsResult.ranges -// is com.larsreimann.safeds.testing.FindTestRangesResult.Failure -> return locationsResult.message -// } -// -// // Must not contain more locations markers than severities -// if (severities.size < locations.size) { -// return "Test file contains more locations (»«) than severities." -// } -// -// // Must be able to parse the test file -// if (parseHelper.parseProgramText(program) == null) { -// return "Could not parse test file." -// } -// -// // Must not combine syntax errors with checks of semantic errors -// if (severities.intersect(com.larsreimann.safeds.semanticSeverities).isNotEmpty()) { -// if (severities.contains(com.larsreimann.safeds.SYNTAX_ERROR)) { -// return "Cannot combine severity 'syntax_error' with check of semantic errors." -// } -// -// val syntaxErrors = actualIssues(program, filePath).filter { it.isSyntaxError } -// if (syntaxErrors.isNotEmpty()) { -// return "File checks for semantic issues but has syntax errors${syntaxErrors.stringify()}" -// } -// } -// -// return null -// } -// -// private fun createTest(resourcePath: java.nio.file.Path, filePath: java.nio.file.Path, program: String) = sequence { -// expectedIssues(program) -// .groupBy { it.severity to it.message } -// .keys -// .forEach { (severity, message) -> -// yield( -// com.larsreimann.safeds.testing.CategorizedTest( -// severity, -// org.junit.jupiter.api.DynamicTest.dynamicTest( -// com.larsreimann.safeds.testing.testDisplayName( -// resourcePath, -// filePath, -// message -// ), filePath.toUri() -// ) { -// parsingTest(program, filePath, severity, message) -// } -// ) -// ) -// } -// } -// -// private fun parsingTest(program: String, filePath: java.nio.file.Path, severity: String, message: String) { -// val actualIssues = actualIssues(program, filePath) -// expectedIssues(program) -// .filter { it.severity == severity && it.message == message } -// .forEach { -// when (it.severity) { -// com.larsreimann.safeds.SYNTAX_ERROR -> actualIssues.shouldHaveSyntaxError(it) -// com.larsreimann.safeds.NO_SYNTAX_ERROR -> actualIssues.shouldHaveNoSyntaxError(it) -// com.larsreimann.safeds.SEMANTIC_ERROR -> actualIssues.shouldHaveSemanticError(it) -// com.larsreimann.safeds.NO_SEMANTIC_ERROR -> actualIssues.shouldHaveNoSemanticError(it) -// com.larsreimann.safeds.SEMANTIC_WARNING -> actualIssues.shouldHaveSemanticWarning(it) -// com.larsreimann.safeds.NO_SEMANTIC_WARNING -> actualIssues.shouldHaveNoSemanticWarning(it) -// com.larsreimann.safeds.SEMANTIC_INFO -> actualIssues.shouldHaveSemanticInfo(it) -// com.larsreimann.safeds.NO_SEMANTIC_INFO -> actualIssues.shouldHaveNoSemanticInfo(it) -// com.larsreimann.safeds.NO_ISSUE -> actualIssues.shouldHaveNoIssue(it) -// } -// } -// } -// -// private fun expectedIssues(program: String): List { -// val locations = when (val locationsResult = com.larsreimann.safeds.testing.findTestRanges(program)) { -// is com.larsreimann.safeds.testing.FindTestRangesResult.Success -> locationsResult.ranges -// else -> return emptyList() -// } -// -// return com.larsreimann.safeds.utils.outerZipBy( -// severitiesAndMessages(program), -// locations -// ) { severityAndMessage, location -> -// com.larsreimann.safeds.testing.assertions.ExpectedIssue( -// severityAndMessage!!.severity, -// severityAndMessage.message, -// severityAndMessage.messageIsRegex, -// location -// ) -// } -// } -// -// private fun severities(program: String): List { -// return severitiesAndMessages(program).map { it.severity } -// } -// -// private fun severitiesAndMessages(program: String): List { -// return """//\s*(?\S+)\s*(?:(?r)?"(?[^"]*)")?""" -// .toRegex() -// .findAll(program) -// .map { -// com.larsreimann.safeds.testing.assertions.ExpectedIssue( -// it.groupValues[1], -// it.groupValues[3], -// it.groupValues[2] == "r", -// null -// ) -// } -// .toList() -// } -// -// private fun actualIssues(program: String, filePath: java.nio.file.Path): List { -// val parsingResult = parseHelper.parseProgramText(program) ?: return emptyList() -// parsingResult.eResource().eAdapters().add(com.larsreimann.safeds.emf.OriginalFilePath(filePath.toString())) -// return validationHelper.validate(parsingResult) -// } -// } diff --git a/DSL-langium/tests/grammar/testGrammar.test.ts b/DSL-langium/tests/grammar/testGrammar.test.ts new file mode 100644 index 000000000..5e97979de --- /dev/null +++ b/DSL-langium/tests/grammar/testGrammar.test.ts @@ -0,0 +1,124 @@ +import { listTestResources, resolvePathRelativeToResources } from '../helpers/testResources'; +import { describe, it } from 'vitest'; +import { NoCommentsError } from '../helpers/testChecks'; +import fs from 'fs'; +import { findTestComments } from '../helpers/testComments'; +import path from 'path'; +import { createSafeDsServices } from '../../src/language-server/safe-ds-module'; +import { NodeFileSystem } from 'langium/node'; +import { URI } from 'vscode-uri'; +import { AssertionError } from 'assert'; + +const services = createSafeDsServices(NodeFileSystem).SafeDs; + +describe('grammar', () => { + it.each(createGrammarTests())('$testName', async (test) => { + if (test.error) { + throw test.error; + } + + const document = services.shared.workspace.LangiumDocuments.getOrCreateDocument(URI.file(test.absolutePath)); + await services.shared.workspace.DocumentBuilder.build([document], { validationChecks: 'all' }); + + const diagnostics = document.diagnostics; + if (!diagnostics) { + throw new Error('No diagnostics found'); + } + + const grammarErrors = diagnostics.filter( + (d) => d.severity === 1 && (d.code === 'lexing-error' || d.code === 'parsing-error'), + ); + + if (test.expectedResults === 'syntax_error') { + if (grammarErrors.length === 0) { + throw new AssertionError({ + message: 'Expected syntax errors but found none.', + actual: grammarErrors, + expected: [], + }); + } + } + + if (test.expectedResults === 'no_syntax_error') { + if (grammarErrors.length > 0) { + throw new AssertionError({ + message: 'Expected no syntax errors but found some.', + actual: grammarErrors, + expected: [], + }); + } + } + }); +}); + +const createGrammarTests = (): GrammarTest[] => { + return listTestResources('grammar').map((pathRelativeToResources): GrammarTest => { + const absolutePath = resolvePathRelativeToResources(path.join('grammar', pathRelativeToResources)); + const program = fs.readFileSync(absolutePath).toString(); + const comments = findTestComments(program); + + // Must contain at least one comment + if (comments.length === 0) { + return { + absolutePath, + expectedResults: 'invalid', + testName: `INVALID TEST FILE [${pathRelativeToResources}]`, + error: new NoCommentsError(), + }; + } + + // Must contain no more than one comment + if (comments.length > 1) { + return { + absolutePath, + expectedResults: 'invalid', + testName: `INVALID TEST FILE [${pathRelativeToResources}]`, + error: new MultipleCommentsError(comments), + }; + } + + const comment = comments[0]; + + // Must contain a valid comment + if (comment !== 'syntax_error' && comment !== 'no_syntax_error') { + return { + absolutePath, + expectedResults: 'invalid', + testName: `INVALID TEST FILE [${pathRelativeToResources}]`, + error: new InvalidCommentError(comment), + }; + } + + let testName: string; + if (comment === 'syntax_error') { + testName = `[${pathRelativeToResources}] should have syntax errors`; + } else { + testName = `[${pathRelativeToResources}] should not have syntax errors`; + } + + return { + absolutePath, + expectedResults: comment, + testName, + }; + }); +}; + +interface GrammarTest { + absolutePath: string; + expectedResults: 'syntax_error' | 'no_syntax_error' | 'invalid'; + testName: string; + error?: Error; +} + +class MultipleCommentsError extends Error { + constructor(readonly comments: string[]) { + super(`Found multiple test comments (grammar tests expect only one): ${comments}`); + } +} + +class InvalidCommentError extends Error { + constructor(readonly comment: string) { + super(`Invalid test comment (valid values are 'syntax_error' and 'no_syntax_error'): ${comment}`); + } +} diff --git a/DSL-langium/tests/helpers/testChecks.ts b/DSL-langium/tests/helpers/testChecks.ts index 9272fef6d..8b2b904d7 100644 --- a/DSL-langium/tests/helpers/testChecks.ts +++ b/DSL-langium/tests/helpers/testChecks.ts @@ -34,7 +34,7 @@ export const findTestChecks = (program: string): Result { - it('should yield all Safe-DS files in a directory', () => { - expect(listTestResources('grammar').length > 0).toBeTruthy(); + it('should yield all Safe-DS files in a directory that are not skipped', () => { + const result = listTestResources('helpers/listTestResources') + .map((path) => path.replace(/\\/gu, '/')) + .sort(); + const expected = [ + 'pipeline file.sdspipe', + 'stub file.sdsstub', + 'test file.sdstest', + 'nested/pipeline file.sdspipe', + 'nested/stub file.sdsstub', + 'nested/test file.sdstest', + ].sort(); + expect(result).toStrictEqual(expected); }); }); diff --git a/DSL-langium/tests/helpers/testResources.ts b/DSL-langium/tests/helpers/testResources.ts index ad1481ea2..3805e3a11 100644 --- a/DSL-langium/tests/helpers/testResources.ts +++ b/DSL-langium/tests/helpers/testResources.ts @@ -2,7 +2,6 @@ import path from 'path'; import { globSync } from 'glob'; import { PIPELINE_FILE_EXTENSION, - SCHEMA_FILE_EXTENSION, STUB_FILE_EXTENSION, TEST_FILE_EXTENSION, } from '../../src/language-server/constant/fileExtensions'; @@ -20,15 +19,21 @@ export const resolvePathRelativeToResources = (pathRelativeToResources: string) }; /** - * Lists all Safe-DS files in the given directory relative to `tests/resources/`. + * Lists all Safe-DS files in the given directory relative to `tests/resources/` except those that have a name starting + * with 'skip'. * * @param pathRelativeToResources The root directory relative to `tests/resources/`. * @return Paths to the Safe-DS files relative to `pathRelativeToResources`. */ -export const listTestResources = (pathRelativeToResources: string) => { - const fileExtensions = [PIPELINE_FILE_EXTENSION, SCHEMA_FILE_EXTENSION, STUB_FILE_EXTENSION, TEST_FILE_EXTENSION]; +export const listTestResources = (pathRelativeToResources: string): string[] => { + const fileExtensions = [PIPELINE_FILE_EXTENSION, STUB_FILE_EXTENSION, TEST_FILE_EXTENSION]; const pattern = `**/*.{${fileExtensions.join(',')}}`; const cwd = resolvePathRelativeToResources(pathRelativeToResources); - return globSync(pattern, { cwd, nodir: true, withFileTypes: true }); + return globSync(pattern, { cwd, nodir: true }).filter(isNotSkipped); +}; + +const isNotSkipped = (pathRelativeToResources: string) => { + const segments = pathRelativeToResources.split(path.sep); + return !segments.some((segment) => segment.startsWith('skip')); }; diff --git a/DSL-langium/tests/resources/grammar/compilationUnits/good-complex example.sdstest b/DSL-langium/tests/resources/grammar/compilationUnits/good-complex example.sdstest deleted file mode 100644 index 6cdd256e2..000000000 --- a/DSL-langium/tests/resources/grammar/compilationUnits/good-complex example.sdstest +++ /dev/null @@ -1,11 +0,0 @@ -// $TEST$ no_syntax_error - -@AnnotationCall - -package test - -import someDeclaration -import somePackage.* - -@AnnotationCall -class C diff --git a/DSL-langium/tests/resources/grammar/declarations/annotation calls/bad-unclosed argument list.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotation calls/bad-unclosed argument list.sdstest new file mode 100644 index 000000000..2e72e475f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotation calls/bad-unclosed argument list.sdstest @@ -0,0 +1,4 @@ +// $TEST$ syntax_error + +@Annotation( +class MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-empty argument list.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-empty argument list.sdstest new file mode 100644 index 000000000..32a125ad9 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-empty argument list.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +@Annotation() +class MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-multiple arguments.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-multiple arguments.sdstest new file mode 100644 index 000000000..b7391f53f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-multiple arguments.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +@Annotation(1, a = 2) +class MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-named argument.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-named argument.sdstest new file mode 100644 index 000000000..4ddff2870 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-named argument.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +@Annotation(b = 2) +class MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-no argument list.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-no argument list.sdstest new file mode 100644 index 000000000..1b54f3ab5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-no argument list.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +@Annotation +class MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-positional argument.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-positional argument.sdstest new file mode 100644 index 000000000..e9dfcdb5e --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotation calls/good-positional argument.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +@Annotation(1) +class MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/annotation.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotation.sdstest deleted file mode 100644 index 7b341c5b9..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/annotation.sdstest +++ /dev/null @@ -1,11 +0,0 @@ -// $TEST$ no_syntax_error - -annotation MySimpleAnnotation - -@AnnotationUse annotation MyComplexAnnotation( - @AnnotationUse a: Int, - vararg b: Int = 3 -) constraint { - T2 super Number, - T3 sub Number -} diff --git a/DSL-langium/tests/resources/grammar/declarations/annotationUse.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotationUse.sdstest deleted file mode 100644 index bb42d5a11..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/annotationUse.sdstest +++ /dev/null @@ -1,3 +0,0 @@ -// $TEST$ no_syntax_error - -@AnnotationUse(1, b = 2, A.B) class MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/bad-unclosed constraint list.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/bad-unclosed constraint list.sdstest new file mode 100644 index 000000000..4116a938e --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/bad-unclosed constraint list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +annotation MyAnnotation where { diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/bad-unclosed parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/bad-unclosed parameter list.sdstest new file mode 100644 index 000000000..ec0beccfc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/bad-unclosed parameter list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +annotation MyAnnotation( diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-annotation call.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-annotation call.sdstest new file mode 100644 index 000000000..47a6c6955 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-annotation call.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +@Annotation +annotation MyAnnotation diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-empty parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-empty parameter list.sdstest new file mode 100644 index 000000000..54d35f274 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-empty parameter list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation() diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-multiple parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-multiple parameters.sdstest new file mode 100644 index 000000000..81899746c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-multiple parameters.sdstest @@ -0,0 +1,12 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation( + @Annotation a, + b = 0, + vararg c, + vararg d: Int = 1, + e: Int, + f: Int = 2, + vararg g: Int, + vararg h: Int = 3 +) diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-no parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-no parameter list.sdstest new file mode 100644 index 000000000..a4a5a34d0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-no parameter list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-with multiple constraints.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with multiple constraints.sdstest new file mode 100644 index 000000000..3ef08442f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with multiple constraints.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation where { + T sub Number, + S super Number +} diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-with sub constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with sub constraint.sdstest new file mode 100644 index 000000000..069228496 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with sub constraint.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation() where { + T sub Number +} diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-with super constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with super constraint.sdstest new file mode 100644 index 000000000..7ab1f6aea --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with super constraint.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation() where { + T super Number +} diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed optional parameter.sdstest new file mode 100644 index 000000000..3e6928b3f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed optional parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation(a: Int = 1) diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed required parameter.sdstest new file mode 100644 index 000000000..e3942d821 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed required parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation(a: Int) diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed variadic parameter (with default value).sdstest new file mode 100644 index 000000000..ae66c5f43 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed variadic parameter (with default value).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation(vararg a: Int = 1) diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed variadic parameter.sdstest new file mode 100644 index 000000000..4688982bc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with typed variadic parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation(vararg a: Int) diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped optional parameter.sdstest new file mode 100644 index 000000000..9ba50ee54 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped optional parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation(a = 1) diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped required parameter.sdstest new file mode 100644 index 000000000..d060c811d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped required parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation(a) diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped variadic parameter (with default value).sdstest new file mode 100644 index 000000000..c25497dbb --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped variadic parameter (with default value).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation(vararg a = 1) diff --git a/DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped variadic parameter.sdstest new file mode 100644 index 000000000..9b68704d3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/annotations/good-with untyped variadic parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +annotation MyAnnotation(vararg a) diff --git a/DSL-langium/tests/resources/grammar/declarations/class.sdstest b/DSL-langium/tests/resources/grammar/declarations/class.sdstest deleted file mode 100644 index f16224e55..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/class.sdstest +++ /dev/null @@ -1,19 +0,0 @@ -// $TEST$ no_syntax_error - -class MySimpleClass - -@AnnotationUse -class MyComplexClass - <@AnnotationUse T1, in T2, out T3, T4 :: $SchemaType, T5 :: $ExpressionType, T6 :: $IntType, T7 :: $FloatType, T8 :: $BooleanType, T9 :: $StringType, T10 :: $NamedType> - (@AnnotationUse a: Int, vararg b: Int = 3) - sub SuperClass1, SuperClass2 -{ - constraint { - T2 super Number, - T3 sub Number - } - @AnnotationUse static attr myAttribute: Int - @AnnotationUse class MyClass - @AnnotationUse enum MyEnum - @AnnotationUse static fun MyFunction() -} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-annotated.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-annotated.sdstest new file mode 100644 index 000000000..11ebf0fcf --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-annotated.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + @Annotation attr a +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-no type.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-no type.sdstest new file mode 100644 index 000000000..1b6832792 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-no type.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + attr a +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-static.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-static.sdstest new file mode 100644 index 000000000..c256ad517 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-static.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + static attr a: Int +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-with type.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-with type.sdstest new file mode 100644 index 000000000..8c5eaa374 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/attributes/good-with type.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + attr a: Int +} diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedConstraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/bad-empty parent type list.sdstest similarity index 57% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedConstraint.sdstest rename to DSL-langium/tests/resources/grammar/declarations/classes/bad-empty parent type list.sdstest index 4ad090f86..a4bb256c3 100644 --- a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedConstraint.sdstest +++ b/DSL-langium/tests/resources/grammar/declarations/classes/bad-empty parent type list.sdstest @@ -1,3 +1,3 @@ // $TEST$ syntax_error -class constraint +class MyClass sub diff --git a/DSL-langium/tests/resources/grammar/parserShouldNotCrashOnSyntaxErrors/unclosedEnum.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed body.sdstest similarity index 60% rename from DSL-langium/tests/resources/grammar/parserShouldNotCrashOnSyntaxErrors/unclosedEnum.sdstest rename to DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed body.sdstest index 9294a84da..87b9a8c44 100644 --- a/DSL-langium/tests/resources/grammar/parserShouldNotCrashOnSyntaxErrors/unclosedEnum.sdstest +++ b/DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed body.sdstest @@ -1,3 +1,3 @@ // $TEST$ syntax_error -enum TestEnum { +class MyClass { diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed constraint list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed constraint list.sdstest new file mode 100644 index 000000000..bb2ac2a47 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed constraint list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +class MyClass where { diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed parameter list.sdstest new file mode 100644 index 000000000..63fd5d814 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed parameter list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +class MyClass( diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed type parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed type parameter list.sdstest new file mode 100644 index 000000000..a86d4586b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/bad-unclosed type parameter list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +class MyClass< diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-annotated type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-annotated type parameter.sdstest new file mode 100644 index 000000000..0b2a242b4 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-annotated type parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass<@Annotation T> diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-annotation call.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-annotation call.sdstest new file mode 100644 index 000000000..1b54f3ab5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-annotation call.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +@Annotation +class MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-contravariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-contravariant type parameter.sdstest new file mode 100644 index 000000000..b542c6574 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-contravariant type parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-covariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-covariant type parameter.sdstest new file mode 100644 index 000000000..3a50b5d43 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-covariant type parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-empty body.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-empty body.sdstest new file mode 100644 index 000000000..4576be592 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-empty body.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass {} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-empty constraint list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-empty constraint list.sdstest new file mode 100644 index 000000000..982a5c1a6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-empty constraint list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass where {} diff --git a/DSL-langium/tests/resources/grammar/compilationUnits/good-lone annotation call.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-empty parameter list.sdstest similarity index 62% rename from DSL-langium/tests/resources/grammar/compilationUnits/good-lone annotation call.sdstest rename to DSL-langium/tests/resources/grammar/declarations/classes/good-empty parameter list.sdstest index a5b6ef4dd..fe7486081 100644 --- a/DSL-langium/tests/resources/grammar/compilationUnits/good-lone annotation call.sdstest +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-empty parameter list.sdstest @@ -1,3 +1,3 @@ // $TEST$ no_syntax_error -@AnnotationCall +class MyClass() diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-empty type parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-empty type parameter list.sdstest new file mode 100644 index 000000000..a06a28939 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-empty type parameter list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass<> diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-invariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-invariant type parameter.sdstest new file mode 100644 index 000000000..28d268077 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-invariant type parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-minimal.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-minimal.sdstest new file mode 100644 index 000000000..0b2a10039 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-minimal.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-multiple parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-multiple parameters.sdstest new file mode 100644 index 000000000..0378c142c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-multiple parameters.sdstest @@ -0,0 +1,12 @@ +// $TEST$ no_syntax_error + +class MyClass( + @Annotation a, + b = 0, + vararg c, + vararg d: Int = 1, + e: Int, + f: Int = 2, + vararg g: Int, + vararg h: Int = 3 +) diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-multiple parent types.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-multiple parent types.sdstest new file mode 100644 index 000000000..0c1a84602 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-multiple parent types.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass sub Int, Number diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-multiple type parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-multiple type parameters.sdstest new file mode 100644 index 000000000..f70d8cfc9 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-multiple type parameters.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass<@Annotation T, in S, out U> diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-one parent type.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-one parent type.sdstest new file mode 100644 index 000000000..1231a1b70 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-one parent type.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass sub Int diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-with multiple constraints.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-with multiple constraints.sdstest new file mode 100644 index 000000000..70d006db2 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-with multiple constraints.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +class MyClass where { + T sub Number, + S super Number +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-with sub constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-with sub constraint.sdstest new file mode 100644 index 000000000..be19fbf57 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-with sub constraint.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass where { + T sub Number +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-with super constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-with super constraint.sdstest new file mode 100644 index 000000000..644c8ba78 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-with super constraint.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass where { + T super Number +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-with typed optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-with typed optional parameter.sdstest new file mode 100644 index 000000000..076ed97dc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-with typed optional parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass(a: Int = 1) diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-with typed required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-with typed required parameter.sdstest new file mode 100644 index 000000000..3785d50c5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-with typed required parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass(a: Int) diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-with typed variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-with typed variadic parameter (with default value).sdstest new file mode 100644 index 000000000..7d80bbf85 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-with typed variadic parameter (with default value).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass(vararg a: Int = 1) diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-with typed variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-with typed variadic parameter.sdstest new file mode 100644 index 000000000..d8d9493ee --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-with typed variadic parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass(vararg a: Int) diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped optional parameter.sdstest new file mode 100644 index 000000000..9a29e763c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped optional parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass(a = 1) diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped required parameter.sdstest new file mode 100644 index 000000000..d02baee9a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped required parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass(a) diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped variadic parameter (with default value).sdstest new file mode 100644 index 000000000..9e9ee04b3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped variadic parameter (with default value).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass(vararg a = 1) diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped variadic parameter.sdstest new file mode 100644 index 000000000..5335427be --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/good-with untyped variadic parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class MyClass(vararg a) diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-missing parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-missing parameter list.sdstest new file mode 100644 index 000000000..498a632f5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-missing parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class MyClass { + fun myFunction +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-unclosed constraint list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-unclosed constraint list.sdstest new file mode 100644 index 000000000..0eaeeff59 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-unclosed constraint list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class MyClass { + fun myFunction() where { +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-unclosed parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-unclosed parameter list.sdstest new file mode 100644 index 000000000..637b8a4f8 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-unclosed parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class MyClass { + fun myFunction( +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-unclosed type parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-unclosed type parameter list.sdstest new file mode 100644 index 000000000..7b277e40f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/bad-unclosed type parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class MyClass { + fun myFunction<() +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-annotated type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-annotated type parameter.sdstest new file mode 100644 index 000000000..ef477d564 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-annotated type parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction<@Annotation T>() +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-annotation call.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-annotation call.sdstest new file mode 100644 index 000000000..facc23d9f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-annotation call.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +class MyClass { + @Annotation + fun myFunction() +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-contravariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-contravariant type parameter.sdstest new file mode 100644 index 000000000..07271cf21 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-contravariant type parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-covariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-covariant type parameter.sdstest new file mode 100644 index 000000000..fe603d14c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-covariant type parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-empty constraint list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-empty constraint list.sdstest new file mode 100644 index 000000000..0ef8b4736 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-empty constraint list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() where {} +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-empty type parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-empty type parameter list.sdstest new file mode 100644 index 000000000..bb9ef8be8 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-empty type parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction<>() +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-invariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-invariant type parameter.sdstest new file mode 100644 index 000000000..42bbab079 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-invariant type parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-multiple parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-multiple parameters.sdstest new file mode 100644 index 000000000..2e94b1976 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-multiple parameters.sdstest @@ -0,0 +1,14 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction( + @Annotation a, + b = 0, + vararg c, + vararg d: Int = 1, + e: Int, + f: Int = 2, + vararg g: Int, + vararg h: Int = 3 + ) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-multiple results.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-multiple results.sdstest new file mode 100644 index 000000000..654eba343 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-multiple results.sdstest @@ -0,0 +1,10 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() -> ( + @Annotation a, + b, + c: Int, + d: Int + ) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-multiple type parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-multiple type parameters.sdstest new file mode 100644 index 000000000..e032ddda5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-multiple type parameters.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction<@Annotation T, in S, out U>() +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-no parameters and no results.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-no parameters and no results.sdstest new file mode 100644 index 000000000..0a0ea9b6a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-no parameters and no results.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-no results (explicit).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-no results (explicit).sdstest new file mode 100644 index 000000000..d0ae9f569 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-no results (explicit).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() -> () +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one typed result (in parentheses).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one typed result (in parentheses).sdstest new file mode 100644 index 000000000..aa436229a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one typed result (in parentheses).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() -> (a: Int) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one typed result (no parentheses).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one typed result (no parentheses).sdstest new file mode 100644 index 000000000..997a429ae --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one typed result (no parentheses).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() -> a: Int +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one untyped result (no parentheses).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one untyped result (no parentheses).sdstest new file mode 100644 index 000000000..75dc6dd31 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one untyped result (no parentheses).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() -> a +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one untyped result (with parentheses).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one untyped result (with parentheses).sdstest new file mode 100644 index 000000000..a9b8e054c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-one untyped result (with parentheses).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() -> (a) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-static.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-static.sdstest new file mode 100644 index 000000000..cd54cd70c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-static.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + static fun myFunction() +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with multiple constraints.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with multiple constraints.sdstest new file mode 100644 index 000000000..547148a72 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with multiple constraints.sdstest @@ -0,0 +1,8 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() where { + T sub Number, + S super Number + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with sub constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with sub constraint.sdstest new file mode 100644 index 000000000..556ef38a4 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with sub constraint.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() where { + T sub Number + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with super constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with super constraint.sdstest new file mode 100644 index 000000000..d204b1865 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with super constraint.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction() where { + T super Number + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed optional parameter.sdstest new file mode 100644 index 000000000..d9cda4c57 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed optional parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction(a: Int = 1) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed required parameter.sdstest new file mode 100644 index 000000000..69ecf9bf5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed required parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction(a: Int) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed variadic parameter (with default value).sdstest new file mode 100644 index 000000000..0eaa6ae59 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed variadic parameter (with default value).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction(vararg a: Int = 1) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed variadic parameter.sdstest new file mode 100644 index 000000000..88cb12bb0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with typed variadic parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction(vararg a: Int) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped optional parameter.sdstest new file mode 100644 index 000000000..38ab3d3e9 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped optional parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction(a = 1) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped required parameter.sdstest new file mode 100644 index 000000000..4fb35f804 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped required parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction(a) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped variadic parameter (with default value).sdstest new file mode 100644 index 000000000..0db9826d1 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped variadic parameter (with default value).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction(vararg a = 1) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped variadic parameter.sdstest new file mode 100644 index 000000000..94936d712 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/methods/good-with untyped variadic parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + fun myFunction(vararg a) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-empty parent type list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-empty parent type list.sdstest new file mode 100644 index 000000000..0a05ec67e --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-empty parent type list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class MyOuterClass { + class MyClass sub +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed body.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed body.sdstest new file mode 100644 index 000000000..f4152d904 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed body.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class MyOuterClass { + class MyClass { +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed constraint list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed constraint list.sdstest new file mode 100644 index 000000000..82070763b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed constraint list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class MyOuterClass { + class MyClass where { +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed parameter list.sdstest new file mode 100644 index 000000000..5c7008153 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class MyOuterClass { + class MyClass( +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed type parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed type parameter list.sdstest new file mode 100644 index 000000000..43f00552d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/bad-unclosed type parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class MyOuterClass { + class MyClass< +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-annotated type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-annotated type parameter.sdstest new file mode 100644 index 000000000..bf7b50f2b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-annotated type parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass<@Annotation T> +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-annotation call.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-annotation call.sdstest new file mode 100644 index 000000000..78b0330b8 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-annotation call.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + @Annotation + class MyClass +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-contravariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-contravariant type parameter.sdstest new file mode 100644 index 000000000..e6312b2cd --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-contravariant type parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-covariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-covariant type parameter.sdstest new file mode 100644 index 000000000..6dcfbd6ae --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-covariant type parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty body.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty body.sdstest new file mode 100644 index 000000000..ba9f55304 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty body.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass {} +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty constraint list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty constraint list.sdstest new file mode 100644 index 000000000..d5ed6c64f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty constraint list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass where {} +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty parameter list.sdstest new file mode 100644 index 000000000..62bdbc2d6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass() +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty type parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty type parameter list.sdstest new file mode 100644 index 000000000..a6389af26 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-empty type parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass<> +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-invariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-invariant type parameter.sdstest new file mode 100644 index 000000000..c1909abee --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-invariant type parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-minimal.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-minimal.sdstest new file mode 100644 index 000000000..f090b40bd --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-minimal.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-multiple parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-multiple parameters.sdstest new file mode 100644 index 000000000..d1cf4eec3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-multiple parameters.sdstest @@ -0,0 +1,14 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass( + @Annotation a, + b = 0, + vararg c, + vararg d: Int = 1, + e: Int, + f: Int = 2, + vararg g: Int, + vararg h: Int = 3 + ) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-multiple parent types.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-multiple parent types.sdstest new file mode 100644 index 000000000..c13836076 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-multiple parent types.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass sub Int, Number +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-multiple type parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-multiple type parameters.sdstest new file mode 100644 index 000000000..1cb975c4b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-multiple type parameters.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass<@Annotation T, in S, out U> +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-parent type.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-parent type.sdstest new file mode 100644 index 000000000..c5add9856 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-parent type.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass sub Int +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with multiple constraints.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with multiple constraints.sdstest new file mode 100644 index 000000000..29dd0ba8c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with multiple constraints.sdstest @@ -0,0 +1,8 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass where { + T sub Number, + S super Number + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with sub constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with sub constraint.sdstest new file mode 100644 index 000000000..16548247c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with sub constraint.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass where { + T sub Number + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with super constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with super constraint.sdstest new file mode 100644 index 000000000..1303a7b3f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with super constraint.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass where { + T super Number + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed optional parameter.sdstest new file mode 100644 index 000000000..053c531cd --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed optional parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass(a: Int = 1) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed required parameter.sdstest new file mode 100644 index 000000000..dbe860885 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed required parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass(a: Int) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed variadic parameter (with default value).sdstest new file mode 100644 index 000000000..6ef626686 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed variadic parameter (with default value).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass(vararg a: Int = 1) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed variadic parameter.sdstest new file mode 100644 index 000000000..e3a4c7d43 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with typed variadic parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass(vararg a: Int) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped optional parameter.sdstest new file mode 100644 index 000000000..852ff8b44 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped optional parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass(a = 1) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped required parameter.sdstest new file mode 100644 index 000000000..1b111ca92 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped required parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass(a) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped variadic parameter (with default value).sdstest new file mode 100644 index 000000000..744fd22fd --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped variadic parameter (with default value).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass(vararg a = 1) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped variadic parameter.sdstest new file mode 100644 index 000000000..8f0f9cb64 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested classes/good-with untyped variadic parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyOuterClass { + class MyClass(vararg a) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/bad-unclosed body.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/bad-unclosed body.sdstest new file mode 100644 index 000000000..3d49bba54 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/bad-unclosed body.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class MyClass { + enum MyEnum { +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-annotation call.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-annotation call.sdstest new file mode 100644 index 000000000..a2b634af3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-annotation call.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +class MyClass { + @Annotation + enum MyEnum +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-empty body.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-empty body.sdstest new file mode 100644 index 000000000..d228e3133 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-empty body.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum {} +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-no body.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-no body.sdstest new file mode 100644 index 000000000..5056f93e1 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-no body.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-variants in body.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-variants in body.sdstest new file mode 100644 index 000000000..43204381c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/good-variants in body.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/bad-unclosed constraint list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/bad-unclosed constraint list.sdstest new file mode 100644 index 000000000..8515729dc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/bad-unclosed constraint list.sdstest @@ -0,0 +1,7 @@ +// $TEST$ syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant where { + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/bad-unclosed parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/bad-unclosed parameter list.sdstest new file mode 100644 index 000000000..cb921cd27 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/bad-unclosed parameter list.sdstest @@ -0,0 +1,7 @@ +// $TEST$ syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant( + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/bad-unclosed type parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/bad-unclosed type parameter list.sdstest new file mode 100644 index 000000000..00e45134b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/bad-unclosed type parameter list.sdstest @@ -0,0 +1,7 @@ +// $TEST$ syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant< + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-annotated type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-annotated type parameter.sdstest new file mode 100644 index 000000000..05662f2c6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-annotated type parameter.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant<@Annotation T> + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-annotation call.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-annotation call.sdstest new file mode 100644 index 000000000..4a7b9052d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-annotation call.sdstest @@ -0,0 +1,8 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + @Annotation + MyEnumVariant + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-contravariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-contravariant type parameter.sdstest new file mode 100644 index 000000000..a59a465f1 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-contravariant type parameter.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-covariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-covariant type parameter.sdstest new file mode 100644 index 000000000..3d78ff8a7 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-covariant type parameter.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-empty type parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-empty type parameter list.sdstest new file mode 100644 index 000000000..3a9d6f023 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-empty type parameter list.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant<> + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-invariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-invariant type parameter.sdstest new file mode 100644 index 000000000..a795f912a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-invariant type parameter.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-multiple parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-multiple parameters.sdstest new file mode 100644 index 000000000..d549a77cc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-multiple parameters.sdstest @@ -0,0 +1,16 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant( + @Annotation a, + b = 0, + vararg c, + vararg d: Int = 1, + e: Int, + f: Int = 2, + vararg g: Int, + vararg h: Int = 3 + ) + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-multiple type parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-multiple type parameters.sdstest new file mode 100644 index 000000000..c82b88cd0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-multiple type parameters.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant<@Annotation T, in S, out U> + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-no parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-no parameter list.sdstest new file mode 100644 index 000000000..43204381c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-no parameter list.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with multiple constraints.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with multiple constraints.sdstest new file mode 100644 index 000000000..9cc2772d5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with multiple constraints.sdstest @@ -0,0 +1,10 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant where { + T sub Number, + S super Number + } + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with sub constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with sub constraint.sdstest new file mode 100644 index 000000000..719b83b93 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with sub constraint.sdstest @@ -0,0 +1,9 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant where { + T sub Number + } + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with super constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with super constraint.sdstest new file mode 100644 index 000000000..360126ff6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with super constraint.sdstest @@ -0,0 +1,9 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant where { + T super Number + } + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed optional parameter.sdstest new file mode 100644 index 000000000..d52dc47f5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed optional parameter.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant(a: Int = 1) + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed required parameter.sdstest new file mode 100644 index 000000000..6b69a28fd --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed required parameter.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant(a: Int) + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed variadic parameter (with default value).sdstest new file mode 100644 index 000000000..a8f9f1f73 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed variadic parameter (with default value).sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant(vararg a: Int = 1) + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed variadic parameter.sdstest new file mode 100644 index 000000000..c2cc62905 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with typed variadic parameter.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant(vararg a: Int) + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped optional parameter.sdstest new file mode 100644 index 000000000..33412265b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped optional parameter.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant(a = 1) + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped required parameter.sdstest new file mode 100644 index 000000000..c35df69f7 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped required parameter.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant(a) + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped variadic parameter (with default value).sdstest new file mode 100644 index 000000000..b8ffb4c64 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped variadic parameter (with default value).sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant(vararg a = 1) + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped variadic parameter.sdstest new file mode 100644 index 000000000..7958d78d4 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/classes/nested enums/variants/good-with untyped variadic parameter.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +class MyClass { + enum MyEnum { + MyEnumVariant(vararg a) + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enum.sdstest b/DSL-langium/tests/resources/grammar/declarations/enum.sdstest deleted file mode 100644 index c40e86597..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/enum.sdstest +++ /dev/null @@ -1,12 +0,0 @@ -// $TEST$ no_syntax_error -enum MySimpleEnum - -@AnnotationUse enum MyComplexEnum { - MySimpleVariant - @AnnotationUse MyComplexVariant - <@AnnotationUse T1, in T2, out T3> - (@AnnotationUse a: Int, vararg b: Int = 3) constraint { - T2 super Number, - T3 sub Number - } -} diff --git a/DSL-langium/tests/resources/grammar/parserShouldNotCrashOnSyntaxErrors/unclosedTypeParameterList.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/bad-unclosed body.sdstest similarity index 63% rename from DSL-langium/tests/resources/grammar/parserShouldNotCrashOnSyntaxErrors/unclosedTypeParameterList.sdstest rename to DSL-langium/tests/resources/grammar/declarations/enums/bad-unclosed body.sdstest index c9df5484f..f80c9cee3 100644 --- a/DSL-langium/tests/resources/grammar/parserShouldNotCrashOnSyntaxErrors/unclosedTypeParameterList.sdstest +++ b/DSL-langium/tests/resources/grammar/declarations/enums/bad-unclosed body.sdstest @@ -1,3 +1,3 @@ // $TEST$ syntax_error -class C< +enum MyEnum { diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/good-annotation call.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/good-annotation call.sdstest new file mode 100644 index 000000000..4be876772 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/good-annotation call.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +@Annotation +enum MyEnum diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/good-empty body.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/good-empty body.sdstest new file mode 100644 index 000000000..44b08ebc3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/good-empty body.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +enum MyEnum {} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/good-no body.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/good-no body.sdstest new file mode 100644 index 000000000..a5b34a99e --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/good-no body.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +enum MyEnum diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/good-variants in body.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/good-variants in body.sdstest new file mode 100644 index 000000000..b12562bc9 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/good-variants in body.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/bad-unclosed constraint list.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/bad-unclosed constraint list.sdstest new file mode 100644 index 000000000..69c439741 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/bad-unclosed constraint list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +enum MyEnum { + MyEnumVariant where { +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/bad-unclosed parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/bad-unclosed parameter list.sdstest new file mode 100644 index 000000000..3dea580f6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/bad-unclosed parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +enum MyEnum { + MyEnumVariant( +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/bad-unclosed type parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/bad-unclosed type parameter list.sdstest new file mode 100644 index 000000000..e3216866a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/bad-unclosed type parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +enum MyEnum { + MyEnumVariant< +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-annotated type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-annotated type parameter.sdstest new file mode 100644 index 000000000..66d095001 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-annotated type parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant<@Annotation T> +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-annotation call.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-annotation call.sdstest new file mode 100644 index 000000000..05a3e6a07 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-annotation call.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + @Annotation + MyEnumVariant +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-contravariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-contravariant type parameter.sdstest new file mode 100644 index 000000000..dc652ceca --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-contravariant type parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-covariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-covariant type parameter.sdstest new file mode 100644 index 000000000..6e1b2a6f0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-covariant type parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-empty type parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-empty type parameter list.sdstest new file mode 100644 index 000000000..9255ba4ef --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-empty type parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant<> +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-invariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-invariant type parameter.sdstest new file mode 100644 index 000000000..1a2358796 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-invariant type parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-multiple parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-multiple parameters.sdstest new file mode 100644 index 000000000..8a7f2fb10 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-multiple parameters.sdstest @@ -0,0 +1,14 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant( + @Annotation a, + b = 0, + vararg c, + vararg d: Int = 1, + e: Int, + f: Int = 2, + vararg g: Int, + vararg h: Int = 3 + ) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-multiple type parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-multiple type parameters.sdstest new file mode 100644 index 000000000..3b231db6c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-multiple type parameters.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant<@Annotation T, in S, out U> +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-no parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-no parameter list.sdstest new file mode 100644 index 000000000..b12562bc9 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-no parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with multiple constraints.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with multiple constraints.sdstest new file mode 100644 index 000000000..9032477bb --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with multiple constraints.sdstest @@ -0,0 +1,8 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant where { + T sub Number, + S super Number + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with sub constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with sub constraint.sdstest new file mode 100644 index 000000000..ae6c264ae --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with sub constraint.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant where { + T sub Number + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with super constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with super constraint.sdstest new file mode 100644 index 000000000..3075ab7a3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with super constraint.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant where { + T super Number + } +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed optional parameter.sdstest new file mode 100644 index 000000000..d96e47e93 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed optional parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant(a: Int = 1) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed required parameter.sdstest new file mode 100644 index 000000000..2ce58b312 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed required parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant(a: Int) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed variadic parameter (with default value).sdstest new file mode 100644 index 000000000..8109434ec --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed variadic parameter (with default value).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant(vararg a: Int = 1) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed variadic parameter.sdstest new file mode 100644 index 000000000..0fd1a1f6d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with typed variadic parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant(vararg a: Int) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped optional parameter.sdstest new file mode 100644 index 000000000..9dc984139 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped optional parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant(a = 1) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped required parameter.sdstest new file mode 100644 index 000000000..39bfc4a5f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped required parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant(a) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped variadic parameter (with default value).sdstest new file mode 100644 index 000000000..6cdccf1d2 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped variadic parameter (with default value).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant(vararg a = 1) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped variadic parameter.sdstest new file mode 100644 index 000000000..742a3344c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/enums/variants/good-with untyped variadic parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum MyEnum { + MyEnumVariant(vararg a) +} diff --git a/DSL-langium/tests/resources/grammar/declarations/function.sdstest b/DSL-langium/tests/resources/grammar/declarations/function.sdstest deleted file mode 100644 index 56ad01d76..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/function.sdstest +++ /dev/null @@ -1,16 +0,0 @@ -// $TEST$ no_syntax_error - -fun mySimpleFunction() - -fun myFunctionWithOneResult() -> a : Int - -@MyAnnotation -fun myComplexFunction - <@AnnotationUse T1, in T2, out T3> - (@AnnotationUse a: Int, vararg b: Int = 3) - -> (@AnnotationUse a: Int, b: Int) { - constraint { - T2 super Number, - T3 sub Number - } -} diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/bad-missing parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/bad-missing parameter list.sdstest new file mode 100644 index 000000000..15819fa89 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/bad-missing parameter list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +fun myFunction diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/bad-unclosed constraint list.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/bad-unclosed constraint list.sdstest new file mode 100644 index 000000000..fb955879d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/bad-unclosed constraint list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +fun myFunction() where { diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/bad-unclosed parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/bad-unclosed parameter list.sdstest new file mode 100644 index 000000000..4a6912586 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/bad-unclosed parameter list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +fun myFunction( diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/bad-unclosed type parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/bad-unclosed type parameter list.sdstest new file mode 100644 index 000000000..9f4204468 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/bad-unclosed type parameter list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +fun myFunction<() diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-annotated type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-annotated type parameter.sdstest new file mode 100644 index 000000000..40967e527 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-annotated type parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction<@Annotation T>() diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-annotation call.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-annotation call.sdstest new file mode 100644 index 000000000..2a4d67f0c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-annotation call.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +@Annotation +fun myFunction() diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-contravariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-contravariant type parameter.sdstest new file mode 100644 index 000000000..180c50e9c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-contravariant type parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction() diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-covariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-covariant type parameter.sdstest new file mode 100644 index 000000000..c7d1c7e69 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-covariant type parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction() diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-empty constraint list.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-empty constraint list.sdstest new file mode 100644 index 000000000..faec38e5c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-empty constraint list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction() where {} diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-empty type parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-empty type parameter list.sdstest new file mode 100644 index 000000000..912dae7ab --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-empty type parameter list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction<>() diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-invariant type parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-invariant type parameter.sdstest new file mode 100644 index 000000000..0bda94713 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-invariant type parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction() diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-multiple parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-multiple parameters.sdstest new file mode 100644 index 000000000..b0d409e92 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-multiple parameters.sdstest @@ -0,0 +1,12 @@ +// $TEST$ no_syntax_error + +fun myFunction( + @Annotation a, + b = 0, + vararg c, + vararg d: Int = 1, + e: Int, + f: Int = 2, + vararg g: Int, + vararg h: Int = 3 +) diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-multiple results.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-multiple results.sdstest new file mode 100644 index 000000000..ebe5fb289 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-multiple results.sdstest @@ -0,0 +1,8 @@ +// $TEST$ no_syntax_error + +fun myFunction() -> ( + @Annotation a, + b, + c: Int, + d: Int +) diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-multiple type parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-multiple type parameters.sdstest new file mode 100644 index 000000000..5ea557cec --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-multiple type parameters.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction<@Annotation T, in S, out U>() diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-no parameters and no results.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-no parameters and no results.sdstest new file mode 100644 index 000000000..38ac8b664 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-no parameters and no results.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction() diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-no results (explicit).sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-no results (explicit).sdstest new file mode 100644 index 000000000..8a7ee30b0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-no results (explicit).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction() -> () diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-one typed result (in parentheses).sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-one typed result (in parentheses).sdstest new file mode 100644 index 000000000..932034a2f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-one typed result (in parentheses).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction() -> (a: Int) diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-one typed result (no parentheses).sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-one typed result (no parentheses).sdstest new file mode 100644 index 000000000..c91c991cc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-one typed result (no parentheses).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction() -> a: Int diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-one untyped result (no parentheses).sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-one untyped result (no parentheses).sdstest new file mode 100644 index 000000000..b32182047 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-one untyped result (no parentheses).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction() -> a diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-one untyped result (with parentheses).sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-one untyped result (with parentheses).sdstest new file mode 100644 index 000000000..2333def59 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-one untyped result (with parentheses).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction() -> (a) diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-with multiple constraints.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-with multiple constraints.sdstest new file mode 100644 index 000000000..b6c18c2bd --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-with multiple constraints.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +fun myFunction() where { + T sub Number, + S super Number +} diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-with sub constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-with sub constraint.sdstest new file mode 100644 index 000000000..e45cef0ab --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-with sub constraint.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +fun myFunction() where { + T sub Number +} diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-with super constraint.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-with super constraint.sdstest new file mode 100644 index 000000000..77356e3be --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-with super constraint.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +fun myFunction() where { + T super Number +} diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-with typed optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-with typed optional parameter.sdstest new file mode 100644 index 000000000..b5d6b5d96 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-with typed optional parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction(a: Int = 1) diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-with typed required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-with typed required parameter.sdstest new file mode 100644 index 000000000..9eae45a73 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-with typed required parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction(a: Int) diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-with typed variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-with typed variadic parameter (with default value).sdstest new file mode 100644 index 000000000..a5f5d73a7 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-with typed variadic parameter (with default value).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction(vararg a: Int = 1) diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-with typed variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-with typed variadic parameter.sdstest new file mode 100644 index 000000000..b7dc315ad --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-with typed variadic parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction(vararg a: Int) diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped optional parameter.sdstest new file mode 100644 index 000000000..5d9eeac48 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped optional parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction(a = 1) diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped required parameter.sdstest new file mode 100644 index 000000000..89bd904fd --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped required parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction(a) diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped variadic parameter (with default value).sdstest new file mode 100644 index 000000000..2b5a7af3b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped variadic parameter (with default value).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction(vararg a = 1) diff --git a/DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped variadic parameter.sdstest new file mode 100644 index 000000000..bb49096c5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/functions/good-with untyped variadic parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun myFunction(vararg a) diff --git a/DSL-langium/tests/resources/grammar/declarations/pipeline.sdstest b/DSL-langium/tests/resources/grammar/declarations/pipeline.sdstest deleted file mode 100644 index a78a03c35..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/pipeline.sdstest +++ /dev/null @@ -1,7 +0,0 @@ -// $TEST$ no_syntax_error - -pipeline mySimplePipeline {} - -@AnnotationUse pipeline myComplexPipeline { - val a = 1; -} diff --git a/DSL-langium/tests/resources/grammar/declarations/pipelines/bad-missing body.sdstest b/DSL-langium/tests/resources/grammar/declarations/pipelines/bad-missing body.sdstest new file mode 100644 index 000000000..87b1fa7ec --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/pipelines/bad-missing body.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +pipeline myPipeline diff --git a/DSL-langium/tests/resources/grammar/declarations/pipelines/bad-unclosed body.sdstest b/DSL-langium/tests/resources/grammar/declarations/pipelines/bad-unclosed body.sdstest new file mode 100644 index 000000000..9710c4c78 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/pipelines/bad-unclosed body.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +pipeline myPipeline { diff --git a/DSL-langium/tests/resources/grammar/declarations/pipelines/good-annotation call.sdstest b/DSL-langium/tests/resources/grammar/declarations/pipelines/good-annotation call.sdstest new file mode 100644 index 000000000..4e0e63fb6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/pipelines/good-annotation call.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +@Annotation +pipeline myPipeline {} diff --git a/DSL-langium/tests/resources/grammar/declarations/pipelines/good-empty body.sdstest b/DSL-langium/tests/resources/grammar/declarations/pipelines/good-empty body.sdstest new file mode 100644 index 000000000..e65f1eb9c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/pipelines/good-empty body.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline {} diff --git a/DSL-langium/tests/resources/grammar/expressions/templateString_good.sdstest b/DSL-langium/tests/resources/grammar/declarations/pipelines/good-statements in body.sdstest similarity index 65% rename from DSL-langium/tests/resources/grammar/expressions/templateString_good.sdstest rename to DSL-langium/tests/resources/grammar/declarations/pipelines/good-statements in body.sdstest index 2bb136bb0..535617504 100644 --- a/DSL-langium/tests/resources/grammar/expressions/templateString_good.sdstest +++ b/DSL-langium/tests/resources/grammar/declarations/pipelines/good-statements in body.sdstest @@ -1,5 +1,5 @@ // $TEST$ no_syntax_error pipeline myPipeline { - "}} template {{ a }}"; + val a = 1; } diff --git a/DSL-langium/tests/resources/grammar/declarations/predicates/goals/goalsWithArguments.sdstest b/DSL-langium/tests/resources/grammar/declarations/predicates/goals/goalsWithArguments.sdstest deleted file mode 100644 index d1ec75efb..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/predicates/goals/goalsWithArguments.sdstest +++ /dev/null @@ -1,11 +0,0 @@ -// $TEST$ no_syntax_error - -predicate myPredicateWithgoalArgs(){ - goal(myRef, "String", 3, null, 4.4, false) -} - -predicate myPredicateWithgoalNesting(){ - goal( - goalInner("Str", 3) - ) -} diff --git a/DSL-langium/tests/resources/grammar/declarations/predicates/predicate.sdstest b/DSL-langium/tests/resources/grammar/declarations/predicates/predicate.sdstest deleted file mode 100644 index 18c2ce287..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/predicates/predicate.sdstest +++ /dev/null @@ -1,4 +0,0 @@ -// $TEST$ no_syntax_error - -predicate mySimplePredicate(){ -} diff --git a/DSL-langium/tests/resources/grammar/declarations/predicates/predicateComplex.sdstest b/DSL-langium/tests/resources/grammar/declarations/predicates/predicateComplex.sdstest deleted file mode 100644 index 320cb445b..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/predicates/predicateComplex.sdstest +++ /dev/null @@ -1,5 +0,0 @@ -// $TEST$ no_syntax_error - -predicate myComplexPredicate(dataset: Dataset, columnName: String) -> :: Schema { - -} diff --git a/DSL-langium/tests/resources/grammar/declarations/predicates/predicateWithGoals.sdstest b/DSL-langium/tests/resources/grammar/declarations/predicates/predicateWithGoals.sdstest deleted file mode 100644 index 9b2f1f28c..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/predicates/predicateWithGoals.sdstest +++ /dev/null @@ -1,16 +0,0 @@ -// $TEST$ no_syntax_error - -predicate myPredicateWithGoals(){ - goal1(), - goal31(), - goal32(dataset, columnName), - val intermediate1 = goal2() -} - -predicate myPredicateWithGoalsComplex(){ - val intermediate2 = goal41(dataset, columnName), - goal42(dataset, columnName), - goal51(intermediate2), - goal52(dataset, columnName), - goal53(intermediate2, columnName) -} diff --git a/DSL-langium/tests/resources/grammar/declarations/predicates/predicateWithSchemaEffects.sdstest b/DSL-langium/tests/resources/grammar/declarations/predicates/predicateWithSchemaEffects.sdstest deleted file mode 100644 index 31b09295f..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/predicates/predicateWithSchemaEffects.sdstest +++ /dev/null @@ -1,6 +0,0 @@ -// $TEST$ no_syntax_error - -predicate predicateWithSchemaEffectGoals () { - $readSchema("datasetPathStr"), - $checkColumn(::ASchema, "columnNameStr1", "columnNameStr2") -} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/bad-missing body.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/bad-missing body.sdstest new file mode 100644 index 000000000..0ec84c398 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/bad-missing body.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +step myStep() diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/bad-missing parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/bad-missing parameter list.sdstest new file mode 100644 index 000000000..2f821f3f3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/bad-missing parameter list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +step myStep {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/bad-unclosed body.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/bad-unclosed body.sdstest new file mode 100644 index 000000000..1f1003d27 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/bad-unclosed body.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +step myStep() { diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/bad-unclosed parameter list.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/bad-unclosed parameter list.sdstest new file mode 100644 index 000000000..b47930ba1 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/bad-unclosed parameter list.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +step myStep( {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-annotation call.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-annotation call.sdstest new file mode 100644 index 000000000..f9064ba1f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-annotation call.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +@Annotation +step myStep() {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-internal step.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-internal step.sdstest new file mode 100644 index 000000000..39c9b9699 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-internal step.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +internal step myStep() {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-multiple parameters.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-multiple parameters.sdstest new file mode 100644 index 000000000..2b310ba7f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-multiple parameters.sdstest @@ -0,0 +1,12 @@ +// $TEST$ no_syntax_error + +step myStep( + @Annotation a, + b = 0, + vararg c, + vararg d: Int = 1, + e: Int, + f: Int = 2, + vararg g: Int, + vararg h: Int = 3 +) {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-multiple results.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-multiple results.sdstest new file mode 100644 index 000000000..602cf818c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-multiple results.sdstest @@ -0,0 +1,8 @@ +// $TEST$ no_syntax_error + +step myStep() -> ( + @Annotation a, + b, + c: Int, + d: Int +) {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-no parameters and no results and empty body.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-no parameters and no results and empty body.sdstest new file mode 100644 index 000000000..94b676d6f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-no parameters and no results and empty body.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep() {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-no results (explicit).sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-no results (explicit).sdstest new file mode 100644 index 000000000..ed1d9bf40 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-no results (explicit).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep() -> () {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-one typed result (in parentheses).sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-one typed result (in parentheses).sdstest new file mode 100644 index 000000000..37bbacb4f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-one typed result (in parentheses).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep() -> (a: Int) {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-one typed result (no parentheses).sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-one typed result (no parentheses).sdstest new file mode 100644 index 000000000..8ff7019d1 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-one typed result (no parentheses).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep() -> a: Int {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-one untyped result (no parentheses).sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-one untyped result (no parentheses).sdstest new file mode 100644 index 000000000..67d6d5810 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-one untyped result (no parentheses).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep() -> a {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-one untyped result (with parentheses).sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-one untyped result (with parentheses).sdstest new file mode 100644 index 000000000..06e788102 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-one untyped result (with parentheses).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep() -> (a) {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-private step.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-private step.sdstest new file mode 100644 index 000000000..c8150c488 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-private step.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +private step myStep() {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-statements in body.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-statements in body.sdstest new file mode 100644 index 000000000..fe4b455e4 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-statements in body.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +private step myComplexStep() { + val a = 1; +} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-step in compilation unit.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-step in compilation unit.sdstest deleted file mode 100644 index a6f91b993..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/steps/good-step in compilation unit.sdstest +++ /dev/null @@ -1,12 +0,0 @@ -// $TEST$ no_syntax_error - -step mySimpleStep() {} - -internal step myInternalStep() {} - -step myStepWithOneResult() -> a: Int {} - -@AnnotationUse -private step myComplexStep(@AnnotationUse a: Int, vararg b: Int = 3) -> (a: Int, b: Int) { - val a = 1; -} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-step in package.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-step in package.sdstest deleted file mode 100644 index 7217af8a1..000000000 --- a/DSL-langium/tests/resources/grammar/declarations/steps/good-step in package.sdstest +++ /dev/null @@ -1,14 +0,0 @@ -// $TEST$ no_syntax_error - -package myPackage - -step mySimpleStep() {} - -internal step myInternalStep() {} - -step myStepWithOneResult() -> a: Int {} - -@AnnotationUse -private step myComplexStep(@AnnotationUse a: Int, vararg b: Int = 3) -> (a: Int, b: Int) { - val a = 1; -} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-with typed optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-with typed optional parameter.sdstest new file mode 100644 index 000000000..0c6d181ac --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-with typed optional parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep(a: Int = 1) {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-with typed required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-with typed required parameter.sdstest new file mode 100644 index 000000000..6ce90ba3d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-with typed required parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep(a: Int) {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-with typed variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-with typed variadic parameter (with default value).sdstest new file mode 100644 index 000000000..7b2e2a9cd --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-with typed variadic parameter (with default value).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep(vararg a: Int = 1) {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-with typed variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-with typed variadic parameter.sdstest new file mode 100644 index 000000000..ec3001739 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-with typed variadic parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep(vararg a: Int) {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped optional parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped optional parameter.sdstest new file mode 100644 index 000000000..4e56841cb --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped optional parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep(a = 1) {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped required parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped required parameter.sdstest new file mode 100644 index 000000000..bbac35831 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped required parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep(a) {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped variadic parameter (with default value).sdstest new file mode 100644 index 000000000..a245cc26c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped variadic parameter (with default value).sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep(vararg a = 1) {} diff --git a/DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped variadic parameter.sdstest new file mode 100644 index 000000000..f317c8582 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/declarations/steps/good-with untyped variadic parameter.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +step myStep(vararg a) {} diff --git a/DSL-langium/tests/resources/grammar/expressions/templateString_bad.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-addition without left operator.sdstest similarity index 62% rename from DSL-langium/tests/resources/grammar/expressions/templateString_bad.sdstest rename to DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-addition without left operator.sdstest index 9262c589b..93c549ea8 100644 --- a/DSL-langium/tests/resources/grammar/expressions/templateString_bad.sdstest +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-addition without left operator.sdstest @@ -1,5 +1,5 @@ // $TEST$ syntax_error pipeline myPipeline { - "}} template {{ ??? }}"; + + 2; } diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-addition without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-addition without right operator.sdstest new file mode 100644 index 000000000..8b6e73af0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-addition without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 +; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-division without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-division without left operator.sdstest new file mode 100644 index 000000000..57a90363f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-division without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + / 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-division without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-division without right operator.sdstest new file mode 100644 index 000000000..38081c762 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-division without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 /; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-multiplication without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-multiplication without left operator.sdstest new file mode 100644 index 000000000..60a5900f5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-multiplication without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + * 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-multiplication without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-multiplication without right operator.sdstest new file mode 100644 index 000000000..b62d52f6f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-multiplication without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 *; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-negation without operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-negation without operator.sdstest new file mode 100644 index 000000000..854267fb1 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-negation without operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + -; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-subtraction without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-subtraction without right operator.sdstest new file mode 100644 index 000000000..9dd3c100c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/bad-subtraction without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 -; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-addition.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-addition.sdstest new file mode 100644 index 000000000..f273ef1ef --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-addition.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 + 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmeticOperator.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-complex example.sdstest similarity index 61% rename from DSL-langium/tests/resources/grammar/expressions/arithmeticOperator.sdstest rename to DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-complex example.sdstest index b331054e1..313f34cb8 100644 --- a/DSL-langium/tests/resources/grammar/expressions/arithmeticOperator.sdstest +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-complex example.sdstest @@ -1,11 +1,5 @@ // $TEST$ no_syntax_error pipeline myPipeline { - 1 + 2; - 1 - 2; - 1 * 2; - 1 / 2; - -1; - (1 + 2) * -3 / (1 - 4) + 5; } diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-division.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-division.sdstest new file mode 100644 index 000000000..ef34e2fd4 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-division.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 / 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-multiplication.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-multiplication.sdstest new file mode 100644 index 000000000..e7b1bfb6c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-multiplication.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 * 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-negation.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-negation.sdstest new file mode 100644 index 000000000..1974fcb13 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-negation.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + -1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-subtraction.sdstest b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-subtraction.sdstest new file mode 100644 index 000000000..7e5f92717 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/arithmetic operators/good-subtraction.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 - 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/block lambdas/bad-unclosed body.sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/bad-unclosed body.sdstest new file mode 100644 index 000000000..53e199fd2 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/bad-unclosed body.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + () {; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/block lambdas/bad-unclosed parameter list.sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/bad-unclosed parameter list.sdstest new file mode 100644 index 000000000..dd9e7ec5a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/bad-unclosed parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + ( {}; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/blockLambda.sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-filled body.sdstest similarity index 68% rename from DSL-langium/tests/resources/grammar/expressions/blockLambda.sdstest rename to DSL-langium/tests/resources/grammar/expressions/block lambdas/good-filled body.sdstest index f44e798f7..de33ac714 100644 --- a/DSL-langium/tests/resources/grammar/expressions/blockLambda.sdstest +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-filled body.sdstest @@ -1,9 +1,7 @@ // $TEST$ no_syntax_error pipeline myPipeline { - () {}; - - (a, vararg b = 1) { + () { val a = 1; }; } diff --git a/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-multiple parameters.sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-multiple parameters.sdstest new file mode 100644 index 000000000..05cf07fd3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-multiple parameters.sdstest @@ -0,0 +1,14 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + ( + @Annotation a, + b = 0, + vararg c, + vararg d: Int = 1, + e: Int, + f: Int = 2, + vararg g: Int, + vararg h: Int = 3 + ) {}; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-no parameters and empty body.sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-no parameters and empty body.sdstest new file mode 100644 index 000000000..8d1b84daf --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-no parameters and empty body.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + () {}; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed optional parameter.sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed optional parameter.sdstest new file mode 100644 index 000000000..ac6902409 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed optional parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (a: Int = 1) {}; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed required parameter.sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed required parameter.sdstest new file mode 100644 index 000000000..2ca02bd96 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed required parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (a: Int) {}; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed variadic parameter (with default value).sdstest new file mode 100644 index 000000000..eb0a7b515 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed variadic parameter (with default value).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (vararg a: Int = 1) {}; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed variadic parameter.sdstest new file mode 100644 index 000000000..33b75c12f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with typed variadic parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (vararg a: Int) {}; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped optional parameter.sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped optional parameter.sdstest new file mode 100644 index 000000000..1a2b8116e --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped optional parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (a = 1) {}; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped required parameter.sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped required parameter.sdstest new file mode 100644 index 000000000..99c8c27ce --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped required parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (a) {}; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped variadic parameter (with default value).sdstest new file mode 100644 index 000000000..3ad5cbe9d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped variadic parameter (with default value).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (vararg a = 1) {}; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped variadic parameter.sdstest new file mode 100644 index 000000000..bc8022588 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/block lambdas/good-with untyped variadic parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (vararg a) {}; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/bad-unclosed argument list.sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/bad-unclosed argument list.sdstest new file mode 100644 index 000000000..181da1525 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/bad-unclosed argument list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + f(; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/bad-unclosed type argument list.sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/bad-unclosed type argument list.sdstest new file mode 100644 index 000000000..1b23076d3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/bad-unclosed type argument list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + f<(); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/call.sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/good-complex call.sdstest similarity index 92% rename from DSL-langium/tests/resources/grammar/expressions/call.sdstest rename to DSL-langium/tests/resources/grammar/expressions/calls/good-complex call.sdstest index ae8d16985..9ae472078 100644 --- a/DSL-langium/tests/resources/grammar/expressions/call.sdstest +++ b/DSL-langium/tests/resources/grammar/expressions/calls/good-complex call.sdstest @@ -1,6 +1,5 @@ // $TEST$ no_syntax_error pipeline myPipeline { - f(); f<*, in Number, out Number, T = Number>(1, b = 2); } diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/good-contravariant type argument.sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/good-contravariant type argument.sdstest new file mode 100644 index 000000000..3815dcbc4 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/good-contravariant type argument.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + f(); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/good-covariant type argument.sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/good-covariant type argument.sdstest new file mode 100644 index 000000000..24dcd3a17 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/good-covariant type argument.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + f(); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/good-empty type argument list and no arguments.sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/good-empty type argument list and no arguments.sdstest new file mode 100644 index 000000000..2076ae218 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/good-empty type argument list and no arguments.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + f<>(); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/good-named argument.sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/good-named argument.sdstest new file mode 100644 index 000000000..f0e4ce7b8 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/good-named argument.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + f(b = 2); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/good-named type argument.sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/good-named type argument.sdstest new file mode 100644 index 000000000..82bfb5c62 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/good-named type argument.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + f(); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/good-nested type argument lists (named type argument).sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/good-nested type argument lists (named type argument).sdstest new file mode 100644 index 000000000..7af0b6fd7 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/good-nested type argument lists (named type argument).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + f>(); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/good-no type argument list and no arguments.sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/good-no type argument list and no arguments.sdstest new file mode 100644 index 000000000..6cd2261ba --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/good-no type argument list and no arguments.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + f(); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/good-positional argument.sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/good-positional argument.sdstest new file mode 100644 index 000000000..670902594 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/good-positional argument.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + f(1); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/good-positional type argument.sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/good-positional type argument.sdstest new file mode 100644 index 000000000..40ea5c0cb --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/good-positional type argument.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + f(); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/good-star projection.sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/good-star projection.sdstest new file mode 100644 index 000000000..dd2baa076 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/good-star projection.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + f<*>(); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/calls/skip-nested type argument lists (positional type argument).sdstest b/DSL-langium/tests/resources/grammar/expressions/calls/skip-nested type argument lists (positional type argument).sdstest new file mode 100644 index 000000000..664f152ca --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/calls/skip-nested type argument lists (positional type argument).sdstest @@ -0,0 +1,21 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + /* + * Once Langium supports LL(*) parsing, this should work. + * + * For now, we can either parse + * - f>() or + * - a < f() + * but not both. + * + * The problem is that the parser can't decide with finite lookahead whether + * the first < is the start of a type argument list or the operator of a + * comparison expression. + * + * We decided to only support the second case for now. The first case leads + * to a syntax error. To work around this, you can use the following syntax: + * - f>() + */ + f>(); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than or equal without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than or equal without left operator.sdstest new file mode 100644 index 000000000..0f192c492 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than or equal without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + >= 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than or equal without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than or equal without right operator.sdstest new file mode 100644 index 000000000..5985c39bc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than or equal without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 >=; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than without left operator.sdstest new file mode 100644 index 000000000..0a66c978b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + > 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than without right operator.sdstest new file mode 100644 index 000000000..bb733c942 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-greater than without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 >; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than or equal without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than or equal without left operator.sdstest new file mode 100644 index 000000000..7e6d04167 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than or equal without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + <= 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than or equal without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than or equal without right operator.sdstest new file mode 100644 index 000000000..1beda50d3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than or equal without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 <=; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than without left operator.sdstest new file mode 100644 index 000000000..4fe727927 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + < 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than without right operator.sdstest new file mode 100644 index 000000000..da8a9126c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/bad-less than without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 <; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-greater than or equal.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-greater than or equal.sdstest new file mode 100644 index 000000000..b307ff910 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-greater than or equal.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 >= 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-greater than.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-greater than.sdstest new file mode 100644 index 000000000..72d16eac6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-greater than.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 > 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-less than or equal.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-less than or equal.sdstest new file mode 100644 index 000000000..27e5caf27 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-less than or equal.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 <= 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-less than vs. type argument list.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-less than vs. type argument list.sdstest new file mode 100644 index 000000000..084283794 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-less than vs. type argument list.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + // The start of a type argument list of a call could be confused with the less than operator + 1 < a(); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-less than.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-less than.sdstest new file mode 100644 index 000000000..fc782e89a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/comparison operators/good-less than.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 < 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/comparisonOperator.sdstest b/DSL-langium/tests/resources/grammar/expressions/comparisonOperator.sdstest deleted file mode 100644 index 1946226a2..000000000 --- a/DSL-langium/tests/resources/grammar/expressions/comparisonOperator.sdstest +++ /dev/null @@ -1,12 +0,0 @@ -// $TEST$ no_syntax_error - -pipeline myPipeline { - 1 < 2; - 1 <= 2; - 1 == 2; - 1 === 2; - 1 != 2; - 1 !== 2; - 1 >= 2; - 1 > 2; -} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-equal without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-equal without left operator.sdstest new file mode 100644 index 000000000..6f529e441 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-equal without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + == 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-equal without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-equal without right operator.sdstest new file mode 100644 index 000000000..37613704c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-equal without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 ==; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-identical without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-identical without left operator.sdstest new file mode 100644 index 000000000..7c15456a2 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-identical without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + === 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-identical without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-identical without right operator.sdstest new file mode 100644 index 000000000..333baa79c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-identical without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 ===; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not equal without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not equal without left operator.sdstest new file mode 100644 index 000000000..c75d3f48d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not equal without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + != 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not equal without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not equal without right operator.sdstest new file mode 100644 index 000000000..6fbeaccef --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not equal without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 !=; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not identical without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not identical without left operator.sdstest new file mode 100644 index 000000000..2e92a0311 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not identical without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 !==; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not identical without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not identical without right operator.sdstest new file mode 100644 index 000000000..2e92a0311 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operators/bad-not identical without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + 1 !==; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operators/good-equal.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operators/good-equal.sdstest new file mode 100644 index 000000000..ab6082945 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operators/good-equal.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 == 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operators/good-identical.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operators/good-identical.sdstest new file mode 100644 index 000000000..cc17d2bf3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operators/good-identical.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 === 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operators/good-not equal.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operators/good-not equal.sdstest new file mode 100644 index 000000000..66b7ffebc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operators/good-not equal.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 != 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/equality operators/good-not identical.sdstest b/DSL-langium/tests/resources/grammar/expressions/equality operators/good-not identical.sdstest new file mode 100644 index 000000000..1f8971705 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/equality operators/good-not identical.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1 !== 2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/expression lambdas/bad-missing body.sdstest b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/bad-missing body.sdstest new file mode 100644 index 000000000..0ab44dbd2 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/bad-missing body.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + () ->; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/expression lambdas/bad-unclosed parameter list.sdstest b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/bad-unclosed parameter list.sdstest new file mode 100644 index 000000000..c352675a7 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/bad-unclosed parameter list.sdstest @@ -0,0 +1,7 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + ( -> 1; + + (a, vararg b = 1) -> 1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-multiple parameters.sdstest b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-multiple parameters.sdstest new file mode 100644 index 000000000..a6769ce03 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-multiple parameters.sdstest @@ -0,0 +1,14 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + ( + @Annotation a, + b = 0, + vararg c, + vararg d: Int = 1, + e: Int, + f: Int = 2, + vararg g: Int, + vararg h: Int = 3 + ) -> 4; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/expressionLambda.sdstest b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-no parameters.sdstest similarity index 68% rename from DSL-langium/tests/resources/grammar/expressions/expressionLambda.sdstest rename to DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-no parameters.sdstest index a39992494..77b37f429 100644 --- a/DSL-langium/tests/resources/grammar/expressions/expressionLambda.sdstest +++ b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-no parameters.sdstest @@ -2,6 +2,4 @@ pipeline myPipeline { () -> 1; - - (a, vararg b = 1) -> 1; } diff --git a/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed optional parameter.sdstest b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed optional parameter.sdstest new file mode 100644 index 000000000..f158ef73e --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed optional parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (a = 1) -> 1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed required parameter.sdstest b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed required parameter.sdstest new file mode 100644 index 000000000..170c340a6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed required parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (a: Int) -> 1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed variadic parameter (with default value).sdstest new file mode 100644 index 000000000..eb250c22e --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed variadic parameter (with default value).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (vararg a: Int = 1) -> 1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed variadic parameter.sdstest new file mode 100644 index 000000000..53a771e0a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-typed variadic parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (vararg a: Int) -> 1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped optional parameter.sdstest b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped optional parameter.sdstest new file mode 100644 index 000000000..20a884559 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped optional parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (a: Int = 1) -> 1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped required parameter.sdstest b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped required parameter.sdstest new file mode 100644 index 000000000..d7a26079b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped required parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (a) -> 1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped variadic parameter (with default value).sdstest b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped variadic parameter (with default value).sdstest new file mode 100644 index 000000000..faa1e28a5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped variadic parameter (with default value).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (vararg a = 1) -> 1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped variadic parameter.sdstest b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped variadic parameter.sdstest new file mode 100644 index 000000000..7bf04b574 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/expression lambdas/good-untyped variadic parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + (vararg a) -> 1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/chainedExpression.sdstest b/DSL-langium/tests/resources/grammar/expressions/good-complex chained expression.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/expressions/chainedExpression.sdstest rename to DSL-langium/tests/resources/grammar/expressions/good-complex chained expression.sdstest diff --git a/DSL-langium/tests/resources/grammar/expressions/reference.sdstest b/DSL-langium/tests/resources/grammar/expressions/good-reference.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/expressions/reference.sdstest rename to DSL-langium/tests/resources/grammar/expressions/good-reference.sdstest diff --git a/DSL-langium/tests/resources/grammar/expressions/indexedAccess/bad-indexed access without index.sdstest b/DSL-langium/tests/resources/grammar/expressions/indexed accesses/bad-no index.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/expressions/indexedAccess/bad-indexed access without index.sdstest rename to DSL-langium/tests/resources/grammar/expressions/indexed accesses/bad-no index.sdstest diff --git a/DSL-langium/tests/resources/grammar/expressions/indexed accesses/bad-no receiver.sdstest b/DSL-langium/tests/resources/grammar/expressions/indexed accesses/bad-no receiver.sdstest new file mode 100644 index 000000000..54b43fcac --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/indexed accesses/bad-no receiver.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline test { + [1]; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/indexed accesses/bad-unclosed square bracket.sdstest b/DSL-langium/tests/resources/grammar/expressions/indexed accesses/bad-unclosed square bracket.sdstest new file mode 100644 index 000000000..7248c7b52 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/indexed accesses/bad-unclosed square bracket.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline test { + a[1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/indexedAccess/good-indexed access.sdstest b/DSL-langium/tests/resources/grammar/expressions/indexed accesses/good-literal index.sdstest similarity index 84% rename from DSL-langium/tests/resources/grammar/expressions/indexedAccess/good-indexed access.sdstest rename to DSL-langium/tests/resources/grammar/expressions/indexed accesses/good-literal index.sdstest index 6d40c5cf5..ff4ae34be 100644 --- a/DSL-langium/tests/resources/grammar/expressions/indexedAccess/good-indexed access.sdstest +++ b/DSL-langium/tests/resources/grammar/expressions/indexed accesses/good-literal index.sdstest @@ -2,5 +2,4 @@ pipeline test { a[1]; - a[b]; } diff --git a/DSL-langium/tests/resources/grammar/expressions/indexed accesses/good-reference index.sdstest b/DSL-langium/tests/resources/grammar/expressions/indexed accesses/good-reference index.sdstest new file mode 100644 index 000000000..6dafc20c0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/indexed accesses/good-reference index.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline test { + a[b]; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/float/bad-no digits before dot.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/float/bad-no digits before dot.sdstest new file mode 100644 index 000000000..ae5accd17 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/float/bad-no digits before dot.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + .2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/numberLiteral.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/float/good-basic example.sdstest similarity index 95% rename from DSL-langium/tests/resources/grammar/expressions/literals/numberLiteral.sdstest rename to DSL-langium/tests/resources/grammar/expressions/literals/float/good-basic example.sdstest index 823ecd787..0a1139efb 100644 --- a/DSL-langium/tests/resources/grammar/expressions/literals/numberLiteral.sdstest +++ b/DSL-langium/tests/resources/grammar/expressions/literals/float/good-basic example.sdstest @@ -1,7 +1,6 @@ // $TEST$ no_syntax_error pipeline myPipeline { - 1; 1.2; 1e10; diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/float/good-scientific notation with lowercase e.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/float/good-scientific notation with lowercase e.sdstest new file mode 100644 index 000000000..487983bc5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/float/good-scientific notation with lowercase e.sdstest @@ -0,0 +1,8 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1e10; + 1e+10; + 1e-10; + 1.2e2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/float/good-scientific notation with uppercase e.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/float/good-scientific notation with uppercase e.sdstest new file mode 100644 index 000000000..351d43ce3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/float/good-scientific notation with uppercase e.sdstest @@ -0,0 +1,8 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1E10; + 1E+10; + 1E-10; + 1.2E2; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/booleanLiteral.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/good-false.sdstest similarity index 86% rename from DSL-langium/tests/resources/grammar/expressions/literals/booleanLiteral.sdstest rename to DSL-langium/tests/resources/grammar/expressions/literals/good-false.sdstest index 645644621..efe0d5868 100644 --- a/DSL-langium/tests/resources/grammar/expressions/literals/booleanLiteral.sdstest +++ b/DSL-langium/tests/resources/grammar/expressions/literals/good-false.sdstest @@ -1,6 +1,5 @@ // $TEST$ no_syntax_error pipeline myPipeline { - true; false; } diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/nullLiteral.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/good-null.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/expressions/literals/nullLiteral.sdstest rename to DSL-langium/tests/resources/grammar/expressions/literals/good-null.sdstest diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/good-true.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/good-true.sdstest new file mode 100644 index 000000000..58d436665 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/good-true.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + true; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/int/good-leading zero.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/int/good-leading zero.sdstest new file mode 100644 index 000000000..c37f760a5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/int/good-leading zero.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 01; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/int/good-multiple digits.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/int/good-multiple digits.sdstest new file mode 100644 index 000000000..509aab5b1 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/int/good-multiple digits.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1234567890; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/int/good-one digit.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/int/good-one digit.sdstest new file mode 100644 index 000000000..9c748058b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/int/good-one digit.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + 1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/bad-single quotes as delimiters.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/bad-single quotes as delimiters.sdstest new file mode 100644 index 000000000..8b4551d6f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/bad-single quotes as delimiters.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + ''; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/bad-template string with invalid expression.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/bad-template string with invalid expression.sdstest new file mode 100644 index 000000000..a34d0a562 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/bad-template string with invalid expression.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + "{{ ??? }}"; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/bad-unclosed quote.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/bad-unclosed quote.sdstest new file mode 100644 index 000000000..36f8d4140 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/bad-unclosed quote.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + "; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/bad-unclosed template expression.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/bad-unclosed template expression.sdstest new file mode 100644 index 000000000..6c4e7f084 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/bad-unclosed template expression.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + "{{"; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/good-basic content.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-basic content.sdstest new file mode 100644 index 000000000..79cefed4a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-basic content.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + "myString"; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/good-closing template expression delimiter.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-closing template expression delimiter.sdstest new file mode 100644 index 000000000..7f7c2dcae --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-closing template expression delimiter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + "}}"; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/good-curly braces separated by space.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-curly braces separated by space.sdstest new file mode 100644 index 000000000..f12997d16 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-curly braces separated by space.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + "{ {"; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/good-empty template expression.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-empty template expression.sdstest new file mode 100644 index 000000000..064cfd448 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-empty template expression.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + "{{ }}"; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/good-empty.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-empty.sdstest new file mode 100644 index 000000000..dafae1fe5 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-empty.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + ""; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/good-escaped curly brace.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-escaped curly brace.sdstest new file mode 100644 index 000000000..cd8f0e481 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-escaped curly brace.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + "\{{"; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/good-multiple lines.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-multiple lines.sdstest new file mode 100644 index 000000000..64768bc42 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-multiple lines.sdstest @@ -0,0 +1,9 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + " + multi + line + string + "; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/good-newline escape sequence.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-newline escape sequence.sdstest new file mode 100644 index 000000000..7104ee86b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-newline escape sequence.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + "\n"; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/good-single curly brace.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-single curly brace.sdstest new file mode 100644 index 000000000..f9e7f60d6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-single curly brace.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + "{"; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/good-single quote.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-single quote.sdstest new file mode 100644 index 000000000..ac7a4af3a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-single quote.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + "'"; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/good-template string with basic expression.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-template string with basic expression.sdstest new file mode 100644 index 000000000..fc8d3666a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-template string with basic expression.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + "{{ 1 }}"; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/string/good-unicode escape sequence.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-unicode escape sequence.sdstest new file mode 100644 index 000000000..f808b6940 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/literals/string/good-unicode escape sequence.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + "\u000c"; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/literals/stringLiteral.sdstest b/DSL-langium/tests/resources/grammar/expressions/literals/stringLiteral.sdstest deleted file mode 100644 index 280425c1d..000000000 --- a/DSL-langium/tests/resources/grammar/expressions/literals/stringLiteral.sdstest +++ /dev/null @@ -1,19 +0,0 @@ -// $TEST$ no_syntax_error - -pipeline myPipeline { - ""; - "myString"; - "'"; - "\n"; - "\u000c"; - " - multi - line - string - "; - "{"; - "{\n"; - "{ {"; - "not a template { ??? }"; - "not a template either \{{ ??? }}"; -} diff --git a/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-conjunction without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-conjunction without left operator.sdstest new file mode 100644 index 000000000..c8e3415bc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-conjunction without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + and true; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-conjunction without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-conjunction without right operator.sdstest new file mode 100644 index 000000000..3da7f5c06 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-conjunction without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + false and; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-disjunction without left operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-disjunction without left operator.sdstest new file mode 100644 index 000000000..677b31b47 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-disjunction without left operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + or true; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-disjunction without right operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-disjunction without right operator.sdstest new file mode 100644 index 000000000..13971f94c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-disjunction without right operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + true or; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-negation without operator.sdstest b/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-negation without operator.sdstest new file mode 100644 index 000000000..854267fb1 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/logical operations/bad-negation without operator.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + -; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/logicalOperator.sdstest b/DSL-langium/tests/resources/grammar/expressions/logical operations/good-complex example.sdstest similarity index 61% rename from DSL-langium/tests/resources/grammar/expressions/logicalOperator.sdstest rename to DSL-langium/tests/resources/grammar/expressions/logical operations/good-complex example.sdstest index 295bca6f7..0a12be465 100644 --- a/DSL-langium/tests/resources/grammar/expressions/logicalOperator.sdstest +++ b/DSL-langium/tests/resources/grammar/expressions/logical operations/good-complex example.sdstest @@ -1,9 +1,5 @@ // $TEST$ no_syntax_error pipeline myPipeline { - false and true; - true or true; - not true; - not true and false or true; } diff --git a/DSL-langium/tests/resources/grammar/expressions/logical operations/good-conjunction.sdstest b/DSL-langium/tests/resources/grammar/expressions/logical operations/good-conjunction.sdstest new file mode 100644 index 000000000..89fea66ff --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/logical operations/good-conjunction.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + false and true; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/logical operations/good-disjunction.sdstest b/DSL-langium/tests/resources/grammar/expressions/logical operations/good-disjunction.sdstest new file mode 100644 index 000000000..271891b9f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/logical operations/good-disjunction.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + true or true; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/logical operations/good-negation.sdstest b/DSL-langium/tests/resources/grammar/expressions/logical operations/good-negation.sdstest new file mode 100644 index 000000000..30790c5de --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/logical operations/good-negation.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + not true; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/member accesses/bad-no receiver.sdstest b/DSL-langium/tests/resources/grammar/expressions/member accesses/bad-no receiver.sdstest new file mode 100644 index 000000000..f21bdfb45 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/member accesses/bad-no receiver.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + .member; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/member accesses/good-not nullable.sdstest b/DSL-langium/tests/resources/grammar/expressions/member accesses/good-not nullable.sdstest new file mode 100644 index 000000000..0143e79a9 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/member accesses/good-not nullable.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + a.member; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/memberAccess.sdstest b/DSL-langium/tests/resources/grammar/expressions/member accesses/good-nullable.sdstest similarity index 82% rename from DSL-langium/tests/resources/grammar/expressions/memberAccess.sdstest rename to DSL-langium/tests/resources/grammar/expressions/member accesses/good-nullable.sdstest index cc0b07e35..1a9b8c15e 100644 --- a/DSL-langium/tests/resources/grammar/expressions/memberAccess.sdstest +++ b/DSL-langium/tests/resources/grammar/expressions/member accesses/good-nullable.sdstest @@ -1,6 +1,5 @@ // $TEST$ no_syntax_error pipeline myPipeline { - a.member; a?.member; } diff --git a/DSL-langium/tests/resources/grammar/expressions/parenthesized expressions/bad-unclosed parenthesis.sdstest b/DSL-langium/tests/resources/grammar/expressions/parenthesized expressions/bad-unclosed parenthesis.sdstest new file mode 100644 index 000000000..96a1dce5a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/parenthesized expressions/bad-unclosed parenthesis.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + (1; +} diff --git a/DSL-langium/tests/resources/grammar/expressions/parenthesized expressions/good-nested.sdstest b/DSL-langium/tests/resources/grammar/expressions/parenthesized expressions/good-nested.sdstest new file mode 100644 index 000000000..5b210c27a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/expressions/parenthesized expressions/good-nested.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + ((1 + 2)); +} diff --git a/DSL-langium/tests/resources/grammar/expressions/parenthesizedExpression.sdstest b/DSL-langium/tests/resources/grammar/expressions/parenthesized expressions/good-one level.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/expressions/parenthesizedExpression.sdstest rename to DSL-langium/tests/resources/grammar/expressions/parenthesized expressions/good-one level.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescaped_.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped _.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescaped_.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped _.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedAnd.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped and.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedAnd.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped and.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedAnnotation.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped annotation.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedAnnotation.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped annotation.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedAs.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped as.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedAs.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped as.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedAttr.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped attr.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedAttr.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped attr.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedClass.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped class.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedClass.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped class.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedEnum.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped enum.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedEnum.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped enum.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedFalse.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped false.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedFalse.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped false.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedFun.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped fun.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedFun.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped fun.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedImport.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped import.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedImport.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped import.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedIn.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped in.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedIn.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped in.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped internal.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped internal.sdstest new file mode 100644 index 000000000..68b05ffe4 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped internal.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +class internal diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedNot.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped not.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedNot.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped not.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedNull.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped null.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedNull.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped null.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedOr.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped or.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedOr.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped or.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedOut.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped out.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedOut.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped out.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedPackage.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped package.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedPackage.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped package.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedWorkflow.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped pipeline.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedWorkflow.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped pipeline.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped private.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped private.sdstest new file mode 100644 index 000000000..f701b4bc9 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped private.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +class private diff --git a/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped protocol.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped protocol.sdstest new file mode 100644 index 000000000..0f2356f04 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped protocol.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +class protocol diff --git a/DSL-langium/tests/resources/grammar/parserShouldNotCrashOnSyntaxErrors/unclosedResultList.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped schema.sdstest similarity index 64% rename from DSL-langium/tests/resources/grammar/parserShouldNotCrashOnSyntaxErrors/unclosedResultList.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped schema.sdstest index 66c9b9dab..bc788c52d 100644 --- a/DSL-langium/tests/resources/grammar/parserShouldNotCrashOnSyntaxErrors/unclosedResultList.sdstest +++ b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped schema.sdstest @@ -1,3 +1,3 @@ // $TEST$ syntax_error -fun s() -> ( +class schema diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedStatic.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped static.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedStatic.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped static.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedStep.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped step.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedStep.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped step.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedSub.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped sub.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedSub.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped sub.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped subterm.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped subterm.sdstest new file mode 100644 index 000000000..6ddbf4594 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped subterm.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +class subterm diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedSuper.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped super.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedSuper.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped super.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedTrue.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped true.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedTrue.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped true.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedUnion.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped union.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedUnion.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped union.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedVal.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped val.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedVal.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped val.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedVararg.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped vararg.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedVararg.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped vararg.sdstest diff --git a/DSL-langium/tests/resources/grammar/parserShouldNotCrashOnSyntaxErrors/unclosedParameterList.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped where.sdstest similarity index 66% rename from DSL-langium/tests/resources/grammar/parserShouldNotCrashOnSyntaxErrors/unclosedParameterList.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped where.sdstest index 1b8e0e4f0..4a5a8cf79 100644 --- a/DSL-langium/tests/resources/grammar/parserShouldNotCrashOnSyntaxErrors/unclosedParameterList.sdstest +++ b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped where.sdstest @@ -1,3 +1,3 @@ // $TEST$ syntax_error -fun f( +class where diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedYield.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped yield.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/bad-unescapedYield.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/bad-unescaped yield.sdstest diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/good-escapedKeywords.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/good-escapedKeywords.sdstest similarity index 79% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/good-escapedKeywords.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/good-escapedKeywords.sdstest index 3375be979..3f5f1b988 100644 --- a/DSL-langium/tests/resources/grammar/keywordsAsNames/good-escapedKeywords.sdstest +++ b/DSL-langium/tests/resources/grammar/keywords as names/good-escapedKeywords.sdstest @@ -6,24 +6,29 @@ class `annotation` class `as` class `attr` class `class` -class `constraint` class `enum` class `false` class `fun` class `import` class `in` +class `internal` class `not` class `null` class `or` class `out` class `package` class `pipeline` +class `private` +class `protocol` +class `schema` class `static` class `step` class `sub` +class `subterm` class `super` class `true` class `union` class `val` class `vararg` +class `where` class `yield` diff --git a/DSL-langium/tests/resources/grammar/keywordsAsNames/good-escapedNonKeyword.sdstest b/DSL-langium/tests/resources/grammar/keywords as names/good-escapedNonKeyword.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/keywordsAsNames/good-escapedNonKeyword.sdstest rename to DSL-langium/tests/resources/grammar/keywords as names/good-escapedNonKeyword.sdstest diff --git a/DSL-langium/tests/resources/grammar/modules/bad-annotation call after declaration.sdstest b/DSL-langium/tests/resources/grammar/modules/bad-annotation call after declaration.sdstest new file mode 100644 index 000000000..32b6ba5f6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/bad-annotation call after declaration.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class C + +@Annotation1 diff --git a/DSL-langium/tests/resources/grammar/modules/bad-annotation call after import.sdstest b/DSL-langium/tests/resources/grammar/modules/bad-annotation call after import.sdstest new file mode 100644 index 000000000..171deaf7a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/bad-annotation call after import.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +import myPackage.MyClass + +@Annotation1 diff --git a/DSL-langium/tests/resources/grammar/modules/bad-annotation call after package name.sdstest b/DSL-langium/tests/resources/grammar/modules/bad-annotation call after package name.sdstest new file mode 100644 index 000000000..c0f18f3a0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/bad-annotation call after package name.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +package test + +@Annotation1 diff --git a/DSL-langium/tests/resources/grammar/compilationUnits/bad-annotation between package and import.sdstest b/DSL-langium/tests/resources/grammar/modules/bad-annotation call between package name and import.sdstest similarity index 50% rename from DSL-langium/tests/resources/grammar/compilationUnits/bad-annotation between package and import.sdstest rename to DSL-langium/tests/resources/grammar/modules/bad-annotation call between package name and import.sdstest index 868e48709..3b16ac8c6 100644 --- a/DSL-langium/tests/resources/grammar/compilationUnits/bad-annotation between package and import.sdstest +++ b/DSL-langium/tests/resources/grammar/modules/bad-annotation call between package name and import.sdstest @@ -2,6 +2,6 @@ package test -@AnnotationCall +@Annotation1 -import someDeclaration +import myPackage.MyClass diff --git a/DSL-langium/tests/resources/grammar/compilationUnits/bad-duplicate package.sdstest b/DSL-langium/tests/resources/grammar/modules/bad-duplicate package name.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/compilationUnits/bad-duplicate package.sdstest rename to DSL-langium/tests/resources/grammar/modules/bad-duplicate package name.sdstest diff --git a/DSL-langium/tests/resources/grammar/modules/bad-import after declaration.sdstest b/DSL-langium/tests/resources/grammar/modules/bad-import after declaration.sdstest new file mode 100644 index 000000000..51e0fd341 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/bad-import after declaration.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class C + +import myPackage.MyClass diff --git a/DSL-langium/tests/resources/grammar/modules/bad-package name after declaration.sdstest b/DSL-langium/tests/resources/grammar/modules/bad-package name after declaration.sdstest new file mode 100644 index 000000000..0050a51dc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/bad-package name after declaration.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +class C + +package test diff --git a/DSL-langium/tests/resources/grammar/compilationUnits/bad-import before package.sdstest b/DSL-langium/tests/resources/grammar/modules/bad-package name after import.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/compilationUnits/bad-import before package.sdstest rename to DSL-langium/tests/resources/grammar/modules/bad-package name after import.sdstest diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation call and declaration.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation call and declaration.sdstest new file mode 100644 index 000000000..4ad22173c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation call and declaration.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +@Annotation1 + +class C diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation call and import and declaration.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation call and import and declaration.sdstest new file mode 100644 index 000000000..271777165 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation call and import and declaration.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +@Annotation1 + +import myPackage.MyClass + +class C diff --git a/DSL-langium/tests/resources/grammar/declarations/package/good-annotationUsesWithImports.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation call and import.sdstest similarity index 77% rename from DSL-langium/tests/resources/grammar/declarations/package/good-annotationUsesWithImports.sdstest rename to DSL-langium/tests/resources/grammar/modules/good-annotation call and import.sdstest index cd6c79b19..bb565d674 100644 --- a/DSL-langium/tests/resources/grammar/declarations/package/good-annotationUsesWithImports.sdstest +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation call and import.sdstest @@ -1,5 +1,5 @@ // $TEST$ no_syntax_error -@AnnotationUse +@Annotation1 import myPackage.MyClass diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation call and package name and declaration.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation call and package name and declaration.sdstest new file mode 100644 index 000000000..bcdd8aca4 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation call and package name and declaration.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +@Annotation1 + +package myPackage + +class C diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation call and package name and import and declaration.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation call and package name and import and declaration.sdstest new file mode 100644 index 000000000..9dcb538ba --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation call and package name and import and declaration.sdstest @@ -0,0 +1,9 @@ +// $TEST$ no_syntax_error + +@Annotation1 + +package myPackage + +import myPackage.MyClass + +class C diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation call and package name and import.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation call and package name and import.sdstest new file mode 100644 index 000000000..95a2c504e --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation call and package name and import.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +@Annotation1 + +package myPackage + +import myPackage.MyClass diff --git a/DSL-langium/tests/resources/grammar/declarations/package/good-annotationUsesWithName.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation call and package name.sdstest similarity index 75% rename from DSL-langium/tests/resources/grammar/declarations/package/good-annotationUsesWithName.sdstest rename to DSL-langium/tests/resources/grammar/modules/good-annotation call and package name.sdstest index 3be6b6f60..bebb420a9 100644 --- a/DSL-langium/tests/resources/grammar/declarations/package/good-annotationUsesWithName.sdstest +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation call and package name.sdstest @@ -1,5 +1,5 @@ // $TEST$ no_syntax_error -@AnnotationUse +@Annotation1 package myPackage diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation call.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation call.sdstest new file mode 100644 index 000000000..d99e5e6a3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation call.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +@Annotation1 diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation calls and declarations.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and declarations.sdstest new file mode 100644 index 000000000..527c03d0d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and declarations.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +@Annotation1 +@Annotation2 + +class C +class D diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation calls and imports and declarations.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and imports and declarations.sdstest new file mode 100644 index 000000000..5d346acdc --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and imports and declarations.sdstest @@ -0,0 +1,11 @@ +// $TEST$ no_syntax_error + +@Annotation1 +@Annotation2 + +import myPackage.MyClass +import myPackage.MyClass as Class +import myPackage.* + +class C +class D diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation calls and imports.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and imports.sdstest new file mode 100644 index 000000000..e1a469205 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and imports.sdstest @@ -0,0 +1,8 @@ +// $TEST$ no_syntax_error + +@Annotation1 +@Annotation2 + +import myPackage.MyClass +import myPackage.MyClass as Class +import myPackage.* diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name and declarations.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name and declarations.sdstest new file mode 100644 index 000000000..670d85b19 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name and declarations.sdstest @@ -0,0 +1,9 @@ +// $TEST$ no_syntax_error + +@Annotation1 +@Annotation2 + +package myPackage + +class C +class D diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name and imports and declarations.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name and imports and declarations.sdstest new file mode 100644 index 000000000..f0eff9127 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name and imports and declarations.sdstest @@ -0,0 +1,13 @@ +// $TEST$ no_syntax_error + +@Annotation1 +@Annotation2 + +package myPackage + +import myPackage.MyClass +import myPackage.MyClass as Class +import myPackage.* + +class C +class D diff --git a/DSL-langium/tests/resources/grammar/declarations/package/good-full.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name and imports.sdstest similarity index 80% rename from DSL-langium/tests/resources/grammar/declarations/package/good-full.sdstest rename to DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name and imports.sdstest index f66ccf200..4b5d0a79f 100644 --- a/DSL-langium/tests/resources/grammar/declarations/package/good-full.sdstest +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name and imports.sdstest @@ -1,11 +1,10 @@ // $TEST$ no_syntax_error -@AnnotationUse +@Annotation1 +@Annotation2 package myPackage import myPackage.MyClass import myPackage.MyClass as Class import myPackage.* - -pipeline p1 {} diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name.sdstest new file mode 100644 index 000000000..777ab87ab --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation calls and package name.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +@Annotation1 +@Annotation2 + +package myPackage diff --git a/DSL-langium/tests/resources/grammar/modules/good-annotation calls.sdstest b/DSL-langium/tests/resources/grammar/modules/good-annotation calls.sdstest new file mode 100644 index 000000000..2c41fba28 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-annotation calls.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +@Annotation1 +@Annotation2 diff --git a/DSL-langium/tests/resources/grammar/modules/good-declaration.sdstest b/DSL-langium/tests/resources/grammar/modules/good-declaration.sdstest new file mode 100644 index 000000000..04c83e5f7 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-declaration.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class C diff --git a/DSL-langium/tests/resources/grammar/modules/good-declarations.sdstest b/DSL-langium/tests/resources/grammar/modules/good-declarations.sdstest new file mode 100644 index 000000000..e64324dd1 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-declarations.sdstest @@ -0,0 +1,4 @@ +// $TEST$ no_syntax_error + +class C +class D diff --git a/DSL-langium/tests/resources/grammar/compilationUnits/good-empty.sdstest b/DSL-langium/tests/resources/grammar/modules/good-empty.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/compilationUnits/good-empty.sdstest rename to DSL-langium/tests/resources/grammar/modules/good-empty.sdstest diff --git a/DSL-langium/tests/resources/grammar/modules/good-import and declaration.sdstest b/DSL-langium/tests/resources/grammar/modules/good-import and declaration.sdstest new file mode 100644 index 000000000..448ebcc73 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-import and declaration.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +import myPackage.MyClass + +class C diff --git a/DSL-langium/tests/resources/grammar/modules/good-import.sdstest b/DSL-langium/tests/resources/grammar/modules/good-import.sdstest new file mode 100644 index 000000000..8e9815b67 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-import.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +import myPackage.MyClass diff --git a/DSL-langium/tests/resources/grammar/modules/good-imports and declarations.sdstest b/DSL-langium/tests/resources/grammar/modules/good-imports and declarations.sdstest new file mode 100644 index 000000000..afaa0c2a3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-imports and declarations.sdstest @@ -0,0 +1,8 @@ +// $TEST$ no_syntax_error + +import myPackage.MyClass +import myPackage.MyClass as Class +import myPackage.* + +class C +class D diff --git a/DSL-langium/tests/resources/grammar/declarations/package/good-importsOnly.sdstest b/DSL-langium/tests/resources/grammar/modules/good-imports.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/declarations/package/good-importsOnly.sdstest rename to DSL-langium/tests/resources/grammar/modules/good-imports.sdstest diff --git a/DSL-langium/tests/resources/grammar/modules/good-package name and declaration.sdstest b/DSL-langium/tests/resources/grammar/modules/good-package name and declaration.sdstest new file mode 100644 index 000000000..467c84b63 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-package name and declaration.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +package myPackage + +class C diff --git a/DSL-langium/tests/resources/grammar/modules/good-package name and declarations.sdstest b/DSL-langium/tests/resources/grammar/modules/good-package name and declarations.sdstest new file mode 100644 index 000000000..5d53478e9 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-package name and declarations.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +package myPackage + +class C +class D diff --git a/DSL-langium/tests/resources/grammar/modules/good-package name and import and declaration.sdstest b/DSL-langium/tests/resources/grammar/modules/good-package name and import and declaration.sdstest new file mode 100644 index 000000000..5a2e75dd9 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-package name and import and declaration.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +package myPackage + +import myPackage.MyClass + +class C diff --git a/DSL-langium/tests/resources/grammar/modules/good-package name and import.sdstest b/DSL-langium/tests/resources/grammar/modules/good-package name and import.sdstest new file mode 100644 index 000000000..c9295f93a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-package name and import.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +package myPackage + +import myPackage.MyClass diff --git a/DSL-langium/tests/resources/grammar/modules/good-package name and imports and declarations.sdstest b/DSL-langium/tests/resources/grammar/modules/good-package name and imports and declarations.sdstest new file mode 100644 index 000000000..6aced7b55 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-package name and imports and declarations.sdstest @@ -0,0 +1,10 @@ +// $TEST$ no_syntax_error + +package myPackage + +import myPackage.MyClass +import myPackage.MyClass as Class +import myPackage.* + +class C +class D diff --git a/DSL-langium/tests/resources/grammar/modules/good-package name and imports.sdstest b/DSL-langium/tests/resources/grammar/modules/good-package name and imports.sdstest new file mode 100644 index 000000000..42d39a21f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/modules/good-package name and imports.sdstest @@ -0,0 +1,7 @@ +// $TEST$ no_syntax_error + +package myPackage + +import myPackage.MyClass +import myPackage.MyClass as Class +import myPackage.* diff --git a/DSL-langium/tests/resources/grammar/declarations/package/good-nameOnly.sdstest b/DSL-langium/tests/resources/grammar/modules/good-package name.sdstest similarity index 100% rename from DSL-langium/tests/resources/grammar/declarations/package/good-nameOnly.sdstest rename to DSL-langium/tests/resources/grammar/modules/good-package name.sdstest diff --git a/DSL-langium/tests/resources/grammar/schema/bad-no name (colon).sdstest b/DSL-langium/tests/resources/grammar/schema/bad-no name (colon).sdstest new file mode 100644 index 000000000..7e8ad7292 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/schema/bad-no name (colon).sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +schema MySchema { + : Int +} diff --git a/DSL-langium/tests/resources/grammar/schema/bad-no name (no colon)sdstest b/DSL-langium/tests/resources/grammar/schema/bad-no name (no colon)sdstest new file mode 100644 index 000000000..b9972ace6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/schema/bad-no name (no colon)sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +schema MySchema { + Int +} diff --git a/DSL-langium/tests/resources/grammar/schema/bad-no type (colon).sdstest b/DSL-langium/tests/resources/grammar/schema/bad-no type (colon).sdstest new file mode 100644 index 000000000..0da371cba --- /dev/null +++ b/DSL-langium/tests/resources/grammar/schema/bad-no type (colon).sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +schema MySchema { + "column1" : +} diff --git a/DSL-langium/tests/resources/grammar/schema/bad-no type (no colon).sdstest b/DSL-langium/tests/resources/grammar/schema/bad-no type (no colon).sdstest new file mode 100644 index 000000000..8a3589f9e --- /dev/null +++ b/DSL-langium/tests/resources/grammar/schema/bad-no type (no colon).sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +schema MySchema { + "column1" +} diff --git a/DSL-langium/tests/resources/grammar/schema/bad-switched name and type.sdstest b/DSL-langium/tests/resources/grammar/schema/bad-switched name and type.sdstest new file mode 100644 index 000000000..354327496 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/schema/bad-switched name and type.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +schema MySchema { + Int: "column1" +} diff --git a/DSL-langium/tests/resources/grammar/schema/bad-unclosed curly brace.sdstest b/DSL-langium/tests/resources/grammar/schema/bad-unclosed curly brace.sdstest new file mode 100644 index 000000000..344b89dab --- /dev/null +++ b/DSL-langium/tests/resources/grammar/schema/bad-unclosed curly brace.sdstest @@ -0,0 +1,3 @@ +// $TEST$ syntax_error + +schema MySchema { diff --git a/DSL-langium/tests/resources/grammar/schema/good-empty schema.sdstest b/DSL-langium/tests/resources/grammar/schema/good-empty schema.sdstest new file mode 100644 index 000000000..f1e64b435 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/schema/good-empty schema.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +schema MySchema {} diff --git a/DSL-langium/tests/resources/grammar/schema/schema.sdsschema b/DSL-langium/tests/resources/grammar/schema/good-one column.sdstest similarity index 60% rename from DSL-langium/tests/resources/grammar/schema/schema.sdsschema rename to DSL-langium/tests/resources/grammar/schema/good-one column.sdstest index 046ba645a..366c0bbe6 100644 --- a/DSL-langium/tests/resources/grammar/schema/schema.sdsschema +++ b/DSL-langium/tests/resources/grammar/schema/good-one column.sdstest @@ -1,5 +1,5 @@ // $TEST$ no_syntax_error schema MySchema { - "column name" : ColumnType + "column1" : Int } diff --git a/DSL-langium/tests/resources/grammar/schema/good-two columns.sdstest b/DSL-langium/tests/resources/grammar/schema/good-two columns.sdstest new file mode 100644 index 000000000..a96bad2f9 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/schema/good-two columns.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +schema MySchema { + "column1" : Int, + "column2" : String +} diff --git a/DSL-langium/tests/resources/grammar/statements/assignments/bad-in block lambda without assignees.sdstest b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in block lambda without assignees.sdstest new file mode 100644 index 000000000..670cdb28e --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in block lambda without assignees.sdstest @@ -0,0 +1,7 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + () { + = 0; + }; +} diff --git a/DSL-langium/tests/resources/grammar/statements/assignments/bad-in block lambda without expression.sdstest b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in block lambda without expression.sdstest new file mode 100644 index 000000000..6d5ea11a6 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in block lambda without expression.sdstest @@ -0,0 +1,7 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + () { + val a =; + }; +} diff --git a/DSL-langium/tests/resources/grammar/statements/assignments/bad-in block lambda without semicolon.sdstest b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in block lambda without semicolon.sdstest new file mode 100644 index 000000000..910fdb296 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in block lambda without semicolon.sdstest @@ -0,0 +1,7 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + () { + val a = 0 + }; +} diff --git a/DSL-langium/tests/resources/grammar/statements/assignments/bad-in pipeline without assignees.sdstest b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in pipeline without assignees.sdstest new file mode 100644 index 000000000..673d19d58 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in pipeline without assignees.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + = 0; +} diff --git a/DSL-langium/tests/resources/grammar/statements/assignments/bad-in pipeline without expression.sdstest b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in pipeline without expression.sdstest new file mode 100644 index 000000000..5bc01e5b0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in pipeline without expression.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + val a =; +} diff --git a/DSL-langium/tests/resources/grammar/statements/assignments/bad-in pipeline without semicolon.sdstest b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in pipeline without semicolon.sdstest new file mode 100644 index 000000000..1a5bd5ec0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in pipeline without semicolon.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + val a = 0 +} diff --git a/DSL-langium/tests/resources/grammar/statements/assignments/bad-in step without assignees.sdstest b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in step without assignees.sdstest new file mode 100644 index 000000000..b8126dc8b --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in step without assignees.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep() { + = 0; +} diff --git a/DSL-langium/tests/resources/grammar/statements/assignments/bad-in step without expression.sdstest b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in step without expression.sdstest new file mode 100644 index 000000000..f549e849f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in step without expression.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep() { + val a =; +} diff --git a/DSL-langium/tests/resources/grammar/statements/assignments/bad-in step without semicolon.sdstest b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in step without semicolon.sdstest new file mode 100644 index 000000000..fae0a7b89 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/assignments/bad-in step without semicolon.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep() { + val a = 0 +} diff --git a/DSL-langium/tests/resources/grammar/statements/assignment.sdstest b/DSL-langium/tests/resources/grammar/statements/assignments/good-in block lambda.sdstest similarity index 71% rename from DSL-langium/tests/resources/grammar/statements/assignment.sdstest rename to DSL-langium/tests/resources/grammar/statements/assignments/good-in block lambda.sdstest index 36b7e7ae2..7f4f5a003 100644 --- a/DSL-langium/tests/resources/grammar/statements/assignment.sdstest +++ b/DSL-langium/tests/resources/grammar/statements/assignments/good-in block lambda.sdstest @@ -1,9 +1,6 @@ // $TEST$ no_syntax_error pipeline myPipeline { - val a = 0; - val a, _, yield b = call(); - () { val a = 0; val a, _, yield b = call(); diff --git a/DSL-langium/tests/resources/grammar/statements/assignments/good-in pipeline.sdstest b/DSL-langium/tests/resources/grammar/statements/assignments/good-in pipeline.sdstest new file mode 100644 index 000000000..547464b38 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/assignments/good-in pipeline.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + val a = 0; + val a, _, yield b = call(); +} diff --git a/DSL-langium/tests/resources/grammar/statements/assignments/good-in step.sdstest b/DSL-langium/tests/resources/grammar/statements/assignments/good-in step.sdstest new file mode 100644 index 000000000..0987d9c52 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/assignments/good-in step.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +step myStep() { + val a = 0; + val a, _, yield b = call(); +} diff --git a/DSL-langium/tests/resources/grammar/statements/bad-empty statement in block lambda.sdstest b/DSL-langium/tests/resources/grammar/statements/bad-empty statement in block lambda.sdstest new file mode 100644 index 000000000..47540d3b2 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/bad-empty statement in block lambda.sdstest @@ -0,0 +1,7 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + () { + ; + }; +} diff --git a/DSL-langium/tests/resources/grammar/statements/bad-empty statement in pipeline.sdstest b/DSL-langium/tests/resources/grammar/statements/bad-empty statement in pipeline.sdstest new file mode 100644 index 000000000..b49c045cb --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/bad-empty statement in pipeline.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + ; +} diff --git a/DSL-langium/tests/resources/grammar/statements/bad-empty statement in step.sdstest b/DSL-langium/tests/resources/grammar/statements/bad-empty statement in step.sdstest new file mode 100644 index 000000000..069d110b0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/bad-empty statement in step.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep() { + ; +} diff --git a/DSL-langium/tests/resources/grammar/statements/expression statements/bad-in block lambda without semicolon.sdstest b/DSL-langium/tests/resources/grammar/statements/expression statements/bad-in block lambda without semicolon.sdstest new file mode 100644 index 000000000..6493c7e33 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/expression statements/bad-in block lambda without semicolon.sdstest @@ -0,0 +1,7 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + () { + call() + }; +} diff --git a/DSL-langium/tests/resources/grammar/statements/expression statements/bad-in pipeline without semicolon.sdstest b/DSL-langium/tests/resources/grammar/statements/expression statements/bad-in pipeline without semicolon.sdstest new file mode 100644 index 000000000..bcf2dbd2e --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/expression statements/bad-in pipeline without semicolon.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +pipeline myPipeline { + call() +} diff --git a/DSL-langium/tests/resources/grammar/statements/expression statements/bad-in step without semicolon.sdstest b/DSL-langium/tests/resources/grammar/statements/expression statements/bad-in step without semicolon.sdstest new file mode 100644 index 000000000..54f343400 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/expression statements/bad-in step without semicolon.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep() { + call() +} diff --git a/DSL-langium/tests/resources/grammar/statements/expressionStatement.sdstest b/DSL-langium/tests/resources/grammar/statements/expression statements/good-in block lambda.sdstest similarity index 86% rename from DSL-langium/tests/resources/grammar/statements/expressionStatement.sdstest rename to DSL-langium/tests/resources/grammar/statements/expression statements/good-in block lambda.sdstest index bc3410be1..63f8f138e 100644 --- a/DSL-langium/tests/resources/grammar/statements/expressionStatement.sdstest +++ b/DSL-langium/tests/resources/grammar/statements/expression statements/good-in block lambda.sdstest @@ -1,8 +1,6 @@ // $TEST$ no_syntax_error pipeline myPipeline { - call(); - () { call(); }; diff --git a/DSL-langium/tests/resources/grammar/statements/expression statements/good-in pipeline.sdstest b/DSL-langium/tests/resources/grammar/statements/expression statements/good-in pipeline.sdstest new file mode 100644 index 000000000..a3fb01309 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/expression statements/good-in pipeline.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline myPipeline { + call(); +} diff --git a/DSL-langium/tests/resources/grammar/statements/expression statements/good-in step.sdstest b/DSL-langium/tests/resources/grammar/statements/expression statements/good-in step.sdstest new file mode 100644 index 000000000..310bc29c7 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/statements/expression statements/good-in step.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep() { + call(); +} diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-argument list of annotation call.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-argument list of annotation call.sdstest new file mode 100644 index 000000000..34d750cd4 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-argument list of annotation call.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +@A(1, 2, ) class C diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inCall_ArgumentList.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-argument list of call.sdstest similarity index 54% rename from DSL-langium/tests/resources/grammar/trailingCommas/inCall_ArgumentList.sdstest rename to DSL-langium/tests/resources/grammar/trailing commas/good-argument list of call.sdstest index 7141c0733..00d833f07 100644 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inCall_ArgumentList.sdstest +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-argument list of call.sdstest @@ -1,5 +1,3 @@ -package tests.trailingComma.inCallArgumentList - // $TEST$ no_syntax_error pipeline p { diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inAssignment_AssigneeList.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-assignee list of assignment in block lambda.sdstest similarity index 51% rename from DSL-langium/tests/resources/grammar/trailingCommas/inAssignment_AssigneeList.sdstest rename to DSL-langium/tests/resources/grammar/trailing commas/good-assignee list of assignment in block lambda.sdstest index 1a977042d..397d41836 100644 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inAssignment_AssigneeList.sdstest +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-assignee list of assignment in block lambda.sdstest @@ -1,10 +1,6 @@ -package tests.trailingComma.inDoStatementAssigneeList - // $TEST$ no_syntax_error pipeline p { - val a, val b, = f(); - () { val a, val b, = f(); }; diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-assignee list of assignment.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-assignee list of assignment.sdstest new file mode 100644 index 000000000..83e8ff91c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-assignee list of assignment.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +pipeline p { + val a, val b, = f(); +} diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inSchema_ColumnList.sdsschema b/DSL-langium/tests/resources/grammar/trailing commas/good-column list of schema.sdstest similarity index 58% rename from DSL-langium/tests/resources/grammar/trailingCommas/inSchema_ColumnList.sdsschema rename to DSL-langium/tests/resources/grammar/trailing commas/good-column list of schema.sdstest index d9ef5be5b..f4dd423f0 100644 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inSchema_ColumnList.sdsschema +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-column list of schema.sdstest @@ -1,5 +1,6 @@ // $TEST$ no_syntax_error schema MySchemaWithTrailingComma { - "column name" : ColumnType, + "column1" : Int, + "column2" : String, } diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of annotation.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of annotation.sdstest new file mode 100644 index 000000000..33f63690d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of annotation.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +annotation A where { + T sub Any, + T super Int, +} diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of class.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of class.sdstest new file mode 100644 index 000000000..8a0d0fd22 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of class.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +class C where { + T sub Any, + T super Int, +} diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of enum variant.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of enum variant.sdstest new file mode 100644 index 000000000..743490924 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of enum variant.sdstest @@ -0,0 +1,8 @@ +// $TEST$ no_syntax_error + +enum E { + A where { + T sub Any, + T super Int, + } +} diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of function.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of function.sdstest new file mode 100644 index 000000000..418bb09a8 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-constraint list of function.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +fun f() where { + T sub Any, + T super Int, +} diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inAnnotation_ParameterList.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of annotation.sdstest similarity index 54% rename from DSL-langium/tests/resources/grammar/trailingCommas/inAnnotation_ParameterList.sdstest rename to DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of annotation.sdstest index fe61472ec..da48dfa89 100644 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inAnnotation_ParameterList.sdstest +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of annotation.sdstest @@ -1,5 +1,3 @@ -package tests.trailingComma.inAnnotationParameterList - // $TEST$ no_syntax_error annotation A( diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inBlockLambda_ParameterList.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of block lambda.sdstest similarity index 54% rename from DSL-langium/tests/resources/grammar/trailingCommas/inBlockLambda_ParameterList.sdstest rename to DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of block lambda.sdstest index 2ed7df85b..a1f3e4e36 100644 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inBlockLambda_ParameterList.sdstest +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of block lambda.sdstest @@ -1,5 +1,3 @@ -package tests.trailingComma.inBlockLambdaParameterList - // $TEST$ no_syntax_error pipeline p { diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inFunctionType_ParameterList.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of callable type.sdstest similarity index 55% rename from DSL-langium/tests/resources/grammar/trailingCommas/inFunctionType_ParameterList.sdstest rename to DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of callable type.sdstest index 8b5fb06d0..6c6179c9c 100644 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inFunctionType_ParameterList.sdstest +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of callable type.sdstest @@ -1,5 +1,3 @@ -package tests.trailingComma.inFunctionTypeParameterList - // $TEST$ no_syntax_error step s( diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inClass_ParameterList.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of class.sdstest similarity index 51% rename from DSL-langium/tests/resources/grammar/trailingCommas/inClass_ParameterList.sdstest rename to DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of class.sdstest index 7f8011e64..5101eeba8 100644 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inClass_ParameterList.sdstest +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of class.sdstest @@ -1,5 +1,3 @@ -package tests.trailingComma.inClassParameterList - // $TEST$ no_syntax_error class C(a: Int, b: Int, ) diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inEnumVariant_ParameterList.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of enum variant.sdstest similarity index 59% rename from DSL-langium/tests/resources/grammar/trailingCommas/inEnumVariant_ParameterList.sdstest rename to DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of enum variant.sdstest index 2117c9ce7..449e1df03 100644 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inEnumVariant_ParameterList.sdstest +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of enum variant.sdstest @@ -1,5 +1,3 @@ -package tests.trailingComma.inEnumVariantParameterList - // $TEST$ no_syntax_error enum E { diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inExpressionLambda_ParameterList.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of expression lambda.sdstest similarity index 53% rename from DSL-langium/tests/resources/grammar/trailingCommas/inExpressionLambda_ParameterList.sdstest rename to DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of expression lambda.sdstest index 4bf11d967..b8a58ec35 100644 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inExpressionLambda_ParameterList.sdstest +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of expression lambda.sdstest @@ -1,5 +1,3 @@ -package tests.trailingComma.inExpressionLambdaParameterList - // $TEST$ no_syntax_error pipeline p { diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inFunction_ParameterList.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of function.sdstest similarity index 53% rename from DSL-langium/tests/resources/grammar/trailingCommas/inFunction_ParameterList.sdstest rename to DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of function.sdstest index 3bc46e422..067186c86 100644 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inFunction_ParameterList.sdstest +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of function.sdstest @@ -1,5 +1,3 @@ -package tests.trailingComma.inFunctionParameterList - // $TEST$ no_syntax_error fun f( diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of step.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of step.sdstest new file mode 100644 index 000000000..367cf0fa3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-parameter list of step.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +step s( + a: Int, + b: Int, +) {} diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-parent type list of class.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-parent type list of class.sdstest new file mode 100644 index 000000000..1bcd73e56 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-parent type list of class.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class C sub D, E, diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inFunctionType_ResultList.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-result list of callable type.sdstest similarity index 57% rename from DSL-langium/tests/resources/grammar/trailingCommas/inFunctionType_ResultList.sdstest rename to DSL-langium/tests/resources/grammar/trailing commas/good-result list of callable type.sdstest index c11cb2db6..354a1a81f 100644 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inFunctionType_ResultList.sdstest +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-result list of callable type.sdstest @@ -1,5 +1,3 @@ -package tests.trailingComma.inFunctionTypeResultList - // $TEST$ no_syntax_error step s( diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-result list of function.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-result list of function.sdstest new file mode 100644 index 000000000..6900e96ea --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-result list of function.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +fun f() -> ( + first: Int, + second: Int, +) diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-result list of step.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-result list of step.sdstest new file mode 100644 index 000000000..7d8d08203 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-result list of step.sdstest @@ -0,0 +1,6 @@ +// $TEST$ no_syntax_error + +step s() -> ( + first: Int, + second: Int, +) {} diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inCall_TypeArgumentList.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-type argument list of call.sdstest similarity index 54% rename from DSL-langium/tests/resources/grammar/trailingCommas/inCall_TypeArgumentList.sdstest rename to DSL-langium/tests/resources/grammar/trailing commas/good-type argument list of call.sdstest index ad92292d3..343063721 100644 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inCall_TypeArgumentList.sdstest +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-type argument list of call.sdstest @@ -1,5 +1,3 @@ -package tests.trailingComma.inCallTypeArgumentList - // $TEST$ no_syntax_error pipeline p { diff --git a/DSL-langium/tests/resources/grammar/types/parenthesizedType.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-type argument list of named type.sdstest similarity index 62% rename from DSL-langium/tests/resources/grammar/types/parenthesizedType.sdstest rename to DSL-langium/tests/resources/grammar/trailing commas/good-type argument list of named type.sdstest index cb4f43c7a..025fc2dea 100644 --- a/DSL-langium/tests/resources/grammar/types/parenthesizedType.sdstest +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-type argument list of named type.sdstest @@ -1,5 +1,5 @@ // $TEST$ no_syntax_error step s( - f: (Int) + f: Type ) {} diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-type argument list of union type.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-type argument list of union type.sdstest new file mode 100644 index 000000000..7cf987db7 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-type argument list of union type.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step s( + f: union +) {} diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-type parameter list of class.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-type parameter list of class.sdstest new file mode 100644 index 000000000..8c208c017 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-type parameter list of class.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +class C diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-type parameter list of enum variant.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-type parameter list of enum variant.sdstest new file mode 100644 index 000000000..6abd76343 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-type parameter list of enum variant.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +enum E { + A +} diff --git a/DSL-langium/tests/resources/grammar/trailing commas/good-type parameter list of function.sdstest b/DSL-langium/tests/resources/grammar/trailing commas/good-type parameter list of function.sdstest new file mode 100644 index 000000000..f139517ef --- /dev/null +++ b/DSL-langium/tests/resources/grammar/trailing commas/good-type parameter list of function.sdstest @@ -0,0 +1,3 @@ +// $TEST$ no_syntax_error + +fun f() diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inAnnotationUse_ArgumentList.sdstest b/DSL-langium/tests/resources/grammar/trailingCommas/inAnnotationUse_ArgumentList.sdstest deleted file mode 100644 index cce7df4c2..000000000 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inAnnotationUse_ArgumentList.sdstest +++ /dev/null @@ -1,5 +0,0 @@ -package tests.trailingComma.inAnnotationUseArgumentList - -// $TEST$ no_syntax_error - -@A(1, 2, ) class C diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inAnnotation_ConstraintList.sdstest b/DSL-langium/tests/resources/grammar/trailingCommas/inAnnotation_ConstraintList.sdstest deleted file mode 100644 index 58d6b5d65..000000000 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inAnnotation_ConstraintList.sdstest +++ /dev/null @@ -1,8 +0,0 @@ -package tests.trailingComma.inAnnotationConstraintList - -// $TEST$ no_syntax_error - -annotation A constraint { - T sub Any, - T super Int -} diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inClass_ConstraintList.sdstest b/DSL-langium/tests/resources/grammar/trailingCommas/inClass_ConstraintList.sdstest deleted file mode 100644 index 489aacf4b..000000000 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inClass_ConstraintList.sdstest +++ /dev/null @@ -1,10 +0,0 @@ -package tests.trailingComma.inClassConstraintList - -// $TEST$ no_syntax_error - -class C { - constraint { - T sub Any, - T super Int - } -} diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inClass_SuperTypeList.sdstest b/DSL-langium/tests/resources/grammar/trailingCommas/inClass_SuperTypeList.sdstest deleted file mode 100644 index 8c840d547..000000000 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inClass_SuperTypeList.sdstest +++ /dev/null @@ -1,5 +0,0 @@ -package tests.trailingComma.inClassSuperTypeList - -// $TEST$ no_syntax_error - -class C sub D, E, diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inClass_TypeParameterList.sdstest b/DSL-langium/tests/resources/grammar/trailingCommas/inClass_TypeParameterList.sdstest deleted file mode 100644 index bd87d0f17..000000000 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inClass_TypeParameterList.sdstest +++ /dev/null @@ -1,5 +0,0 @@ -package tests.trailingComma.inClassTypeParameterList - -// $TEST$ no_syntax_error - -class C diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inEnumVariant_ConstraintList.sdstest b/DSL-langium/tests/resources/grammar/trailingCommas/inEnumVariant_ConstraintList.sdstest deleted file mode 100644 index 78b5fb026..000000000 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inEnumVariant_ConstraintList.sdstest +++ /dev/null @@ -1,7 +0,0 @@ -package tests.trailingComma.inEnumVariantConstraintList - -// $TEST$ no_syntax_error - -enum E { - A -} diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inEnumVariant_TypeParameterList.sdstest b/DSL-langium/tests/resources/grammar/trailingCommas/inEnumVariant_TypeParameterList.sdstest deleted file mode 100644 index b62f090d4..000000000 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inEnumVariant_TypeParameterList.sdstest +++ /dev/null @@ -1,10 +0,0 @@ -package tests.trailingComma.inEnumVariantTypeParameterList - -// $TEST$ no_syntax_error - -enum E { - A constraint { - T sub Any, - T super Int - } -} diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inFunction_ResultList.sdstest b/DSL-langium/tests/resources/grammar/trailingCommas/inFunction_ResultList.sdstest deleted file mode 100644 index 2e750a649..000000000 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inFunction_ResultList.sdstest +++ /dev/null @@ -1,8 +0,0 @@ -package tests.trailingComma.inFunctionResultList - -// $TEST$ no_syntax_error - -fun f() -> ( - first: Int, - second: Int, -) diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inFunction_TypeParameterConstraintList.sdstest b/DSL-langium/tests/resources/grammar/trailingCommas/inFunction_TypeParameterConstraintList.sdstest deleted file mode 100644 index 18e4b74aa..000000000 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inFunction_TypeParameterConstraintList.sdstest +++ /dev/null @@ -1,10 +0,0 @@ -package tests.trailingComma.inFunctionTypeParameterConstraintList - -// $TEST$ no_syntax_error - -fun f() { - constraint { - T sub Any, - T super Int - } -} diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inFunction_TypeParameterList.sdstest b/DSL-langium/tests/resources/grammar/trailingCommas/inFunction_TypeParameterList.sdstest deleted file mode 100644 index 52d4cde27..000000000 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inFunction_TypeParameterList.sdstest +++ /dev/null @@ -1,5 +0,0 @@ -package tests.trailingComma.inFunctionTypeParameterList - -// $TEST$ no_syntax_error - -fun f() diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inNamedType_TypeArgumentList.sdstest b/DSL-langium/tests/resources/grammar/trailingCommas/inNamedType_TypeArgumentList.sdstest deleted file mode 100644 index 35418e95e..000000000 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inNamedType_TypeArgumentList.sdstest +++ /dev/null @@ -1,7 +0,0 @@ -package tests.trailingComma.inNamedTypeTypeArgumentList - -// $TEST$ no_syntax_error - -step s( - f: Type -) {} diff --git a/DSL-langium/tests/resources/grammar/trailingCommas/inWorkflowStep_ParameterList.sdstest b/DSL-langium/tests/resources/grammar/trailingCommas/inWorkflowStep_ParameterList.sdstest deleted file mode 100644 index e2f0e10ca..000000000 --- a/DSL-langium/tests/resources/grammar/trailingCommas/inWorkflowStep_ParameterList.sdstest +++ /dev/null @@ -1,4 +0,0 @@ -package tests.trailingComma.inStepParameterList - -// $TEST$ no_syntax_error -step s(a: Int, b: Int, ) {} diff --git a/DSL-langium/tests/resources/grammar/types/callable types/bad-with missing arrow.sdstest b/DSL-langium/tests/resources/grammar/types/callable types/bad-with missing arrow.sdstest new file mode 100644 index 000000000..3432c3221 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/callable types/bad-with missing arrow.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep( + f: () () +) {} diff --git a/DSL-langium/tests/resources/grammar/types/callable types/bad-with missing parameter list.sdstest b/DSL-langium/tests/resources/grammar/types/callable types/bad-with missing parameter list.sdstest new file mode 100644 index 000000000..eba2fa108 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/callable types/bad-with missing parameter list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep( + f: -> () +) {} diff --git a/DSL-langium/tests/resources/grammar/types/callable types/bad-with missing result list.sdstest b/DSL-langium/tests/resources/grammar/types/callable types/bad-with missing result list.sdstest new file mode 100644 index 000000000..7516b31b0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/callable types/bad-with missing result list.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep( + f: () -> +) {} diff --git a/DSL-langium/tests/resources/grammar/types/callable types/good-with multiple parameters.sdstest b/DSL-langium/tests/resources/grammar/types/callable types/good-with multiple parameters.sdstest new file mode 100644 index 000000000..cf151d175 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/callable types/good-with multiple parameters.sdstest @@ -0,0 +1,14 @@ +// $TEST$ no_syntax_error + +step myStep( + f: ( + @Annotation a, + b = 0, + vararg c, + vararg d: Int = 1, + e: Int, + f: Int = 2, + vararg g: Int, + vararg h: Int = 3 + ) -> () +) {} diff --git a/DSL-langium/tests/resources/grammar/types/callable types/good-with multiple results.sdstest b/DSL-langium/tests/resources/grammar/types/callable types/good-with multiple results.sdstest new file mode 100644 index 000000000..3f560a477 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/callable types/good-with multiple results.sdstest @@ -0,0 +1,10 @@ +// $TEST$ no_syntax_error + +step myStep( + f: () -> ( + @Annotation a, + b, + c: Int, + d: Int + ) +) {} diff --git a/DSL-langium/tests/resources/grammar/types/callable types/good-with one typed parameter.sdstest b/DSL-langium/tests/resources/grammar/types/callable types/good-with one typed parameter.sdstest new file mode 100644 index 000000000..ebe1177da --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/callable types/good-with one typed parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + f: (param: Int) -> () +) {} diff --git a/DSL-langium/tests/resources/grammar/types/callable types/good-with one typed result (in parentheses).sdstest b/DSL-langium/tests/resources/grammar/types/callable types/good-with one typed result (in parentheses).sdstest new file mode 100644 index 000000000..67397963d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/callable types/good-with one typed result (in parentheses).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + f: () -> (result: Int) +) {} diff --git a/DSL-langium/tests/resources/grammar/types/callable types/good-with one typed result (no parentheses).sdstest b/DSL-langium/tests/resources/grammar/types/callable types/good-with one typed result (no parentheses).sdstest new file mode 100644 index 000000000..4cdb662b0 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/callable types/good-with one typed result (no parentheses).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + f: () -> result: Int +) {} diff --git a/DSL-langium/tests/resources/grammar/types/callable types/good-with one untyped parameter.sdstest b/DSL-langium/tests/resources/grammar/types/callable types/good-with one untyped parameter.sdstest new file mode 100644 index 000000000..8c94658c7 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/callable types/good-with one untyped parameter.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + f: (param) -> () +) {} diff --git a/DSL-langium/tests/resources/grammar/types/callable types/good-with one untyped result (in parentheses).sdstest b/DSL-langium/tests/resources/grammar/types/callable types/good-with one untyped result (in parentheses).sdstest new file mode 100644 index 000000000..69f7c44c3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/callable types/good-with one untyped result (in parentheses).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + f: () -> (result) +) {} diff --git a/DSL-langium/tests/resources/grammar/types/callable types/good-with one untyped result (no parentheses).sdstest b/DSL-langium/tests/resources/grammar/types/callable types/good-with one untyped result (no parentheses).sdstest new file mode 100644 index 000000000..7e2dcdbdd --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/callable types/good-with one untyped result (no parentheses).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + f: () -> result +) {} diff --git a/DSL-langium/tests/resources/grammar/types/callable types/good-without parameters or results.sdstest b/DSL-langium/tests/resources/grammar/types/callable types/good-without parameters or results.sdstest new file mode 100644 index 000000000..d2f83fb1c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/callable types/good-without parameters or results.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + f: () -> () +) {} diff --git a/DSL-langium/tests/resources/grammar/types/callableType.sdstest b/DSL-langium/tests/resources/grammar/types/callableType.sdstest deleted file mode 100644 index 746a5d945..000000000 --- a/DSL-langium/tests/resources/grammar/types/callableType.sdstest +++ /dev/null @@ -1,13 +0,0 @@ -// $TEST$ no_syntax_error - -step s1( - f: () -> () -) {} - -step s2( - f: () -> result: Int -) {} - -step s3( - f: (@AnnotationUse a: Int, vararg b: Int = 3) -> (@AnnotationUse a: Int, b: Int) -) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/bad-callable type as member.sdstest b/DSL-langium/tests/resources/grammar/types/member types/bad-callable type as member.sdstest new file mode 100644 index 000000000..654395e34 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/bad-callable type as member.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep( + x: OuterClass.() -> () +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/bad-missing member.sdstest b/DSL-langium/tests/resources/grammar/types/member types/bad-missing member.sdstest new file mode 100644 index 000000000..49cdcafae --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/bad-missing member.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep( + x: OuterClass. +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/bad-missing receiver.sdstest b/DSL-langium/tests/resources/grammar/types/member types/bad-missing receiver.sdstest new file mode 100644 index 000000000..eeefc9211 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/bad-missing receiver.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep( + x: .InnerClass +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/bad-unclosed angle bracket.sdstest b/DSL-langium/tests/resources/grammar/types/member types/bad-unclosed angle bracket.sdstest new file mode 100644 index 000000000..2e7244f96 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/bad-unclosed angle bracket.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep( + x: OuterClass.InnerClass< +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/bad-union type as member.sdstest b/DSL-langium/tests/resources/grammar/types/member types/bad-union type as member.sdstest new file mode 100644 index 000000000..9176a8ed3 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/bad-union type as member.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep( + x: OuterClass.union<> +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/good-long complex chain.sdstest b/DSL-langium/tests/resources/grammar/types/member types/good-long complex chain.sdstest new file mode 100644 index 000000000..62e0b9ee2 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/good-long complex chain.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: union<>.MiddleClass?.InnerClass +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/good-receiver (callable) and member (not nullable).sdstest b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (callable) and member (not nullable).sdstest new file mode 100644 index 000000000..c0e665457 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (callable) and member (not nullable).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: () -> ().InnerClass +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/good-receiver (callable) and member (nullable).sdstest b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (callable) and member (nullable).sdstest new file mode 100644 index 000000000..217c03613 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (callable) and member (nullable).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: () -> ().InnerClass? +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, not nullable) and member (not nullable).sdstest b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, not nullable) and member (not nullable).sdstest new file mode 100644 index 000000000..b25379c87 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, not nullable) and member (not nullable).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: OuterClass.InnerClass +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, not nullable) and member (nullable).sdstest b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, not nullable) and member (nullable).sdstest new file mode 100644 index 000000000..6fc6442ad --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, not nullable) and member (nullable).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: OuterClass.InnerClass? +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, nullable) and member (not nullable).sdstest b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, nullable) and member (not nullable).sdstest new file mode 100644 index 000000000..b2e49bf71 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, nullable) and member (not nullable).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: OuterClass?.InnerClass +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, nullable) and member (nullable).sdstest b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, nullable) and member (nullable).sdstest new file mode 100644 index 000000000..6fc6442ad --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (named, nullable) and member (nullable).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: OuterClass.InnerClass? +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/good-receiver (union) and member (not nullable).sdstest b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (union) and member (not nullable).sdstest new file mode 100644 index 000000000..ea0bee530 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (union) and member (not nullable).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: union<>.InnerClass +) {} diff --git a/DSL-langium/tests/resources/grammar/types/member types/good-receiver (union) and member (nullable).sdstest b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (union) and member (nullable).sdstest new file mode 100644 index 000000000..341d65f09 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/member types/good-receiver (union) and member (nullable).sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: union<>.InnerClass? +) {} diff --git a/DSL-langium/tests/resources/grammar/types/memberType.sdstest b/DSL-langium/tests/resources/grammar/types/memberType.sdstest deleted file mode 100644 index 6a1c72398..000000000 --- a/DSL-langium/tests/resources/grammar/types/memberType.sdstest +++ /dev/null @@ -1,9 +0,0 @@ -// $TEST$ no_syntax_error - -step s1( - f: OuterClass.InnerClass -) {} - -step s2( - f: (OuterClass?.MiddleClass?).InnerClass -) {} diff --git a/DSL-langium/tests/resources/grammar/types/named types/bad-unclosed angle bracket.sdstest b/DSL-langium/tests/resources/grammar/types/named types/bad-unclosed angle bracket.sdstest new file mode 100644 index 000000000..956e664be --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/named types/bad-unclosed angle bracket.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep( + x: OuterClass< +) {} diff --git a/DSL-langium/tests/resources/grammar/types/named types/good-no type arguments and not nullable.sdstest b/DSL-langium/tests/resources/grammar/types/named types/good-no type arguments and not nullable.sdstest new file mode 100644 index 000000000..464ab964f --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/named types/good-no type arguments and not nullable.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: Int +) {} diff --git a/DSL-langium/tests/resources/grammar/types/named types/good-no type arguments and nullable.sdstest b/DSL-langium/tests/resources/grammar/types/named types/good-no type arguments and nullable.sdstest new file mode 100644 index 000000000..963bc6f0d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/named types/good-no type arguments and nullable.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: Int? +) {} diff --git a/DSL-langium/tests/resources/grammar/types/named types/good-type argument and nullable.sdstest b/DSL-langium/tests/resources/grammar/types/named types/good-type argument and nullable.sdstest new file mode 100644 index 000000000..df1550c7a --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/named types/good-type argument and nullable.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: Int<*, in Number, out Number, T = Number>? +) {} diff --git a/DSL-langium/tests/resources/grammar/types/named types/good-type arguments and not nullable.sdstest b/DSL-langium/tests/resources/grammar/types/named types/good-type arguments and not nullable.sdstest new file mode 100644 index 000000000..bd692f196 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/named types/good-type arguments and not nullable.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: Int<*, in Number, out Number, T = Number> +) {} diff --git a/DSL-langium/tests/resources/grammar/types/namedType.sdstest b/DSL-langium/tests/resources/grammar/types/namedType.sdstest deleted file mode 100644 index f1c335e6a..000000000 --- a/DSL-langium/tests/resources/grammar/types/namedType.sdstest +++ /dev/null @@ -1,9 +0,0 @@ -// $TEST$ no_syntax_error - -step s1( - f: Int -) {} - -step s2( - f: Int<*, in Number, out Number, T = Number>? -) {} diff --git a/DSL-langium/tests/resources/grammar/types/union types/bad-unclosed angle bracket.sdstest b/DSL-langium/tests/resources/grammar/types/union types/bad-unclosed angle bracket.sdstest new file mode 100644 index 000000000..b18e3189d --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/union types/bad-unclosed angle bracket.sdstest @@ -0,0 +1,5 @@ +// $TEST$ syntax_error + +step myStep( + x: union< +) {} diff --git a/DSL-langium/tests/resources/grammar/types/union types/good-empty.sdstest b/DSL-langium/tests/resources/grammar/types/union types/good-empty.sdstest new file mode 100644 index 000000000..097a6c062 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/union types/good-empty.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: union<> +) {} diff --git a/DSL-langium/tests/resources/grammar/types/union types/good-nested.sdstest b/DSL-langium/tests/resources/grammar/types/union types/good-nested.sdstest new file mode 100644 index 000000000..5cfdbe211 --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/union types/good-nested.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: union> +) {} diff --git a/DSL-langium/tests/resources/grammar/types/union types/good-with type arguments.sdstest b/DSL-langium/tests/resources/grammar/types/union types/good-with type arguments.sdstest new file mode 100644 index 000000000..8e351850c --- /dev/null +++ b/DSL-langium/tests/resources/grammar/types/union types/good-with type arguments.sdstest @@ -0,0 +1,5 @@ +// $TEST$ no_syntax_error + +step myStep( + x: union +) {} diff --git a/DSL-langium/tests/resources/grammar/types/unionType.sdstest b/DSL-langium/tests/resources/grammar/types/unionType.sdstest deleted file mode 100644 index d31a47b83..000000000 --- a/DSL-langium/tests/resources/grammar/types/unionType.sdstest +++ /dev/null @@ -1,9 +0,0 @@ -// $TEST$ no_syntax_error - -step s1( - f: union<> -) {} - -step s2( - f: union -) {} diff --git a/DSL-langium/tests/resources/grammar/compilationUnits/bad-import before declaration b/DSL-langium/tests/resources/helpers/listTestResources/nested/not a safe-ds file.txt similarity index 100% rename from DSL-langium/tests/resources/grammar/compilationUnits/bad-import before declaration rename to DSL-langium/tests/resources/helpers/listTestResources/nested/not a safe-ds file.txt diff --git a/DSL-langium/tests/resources/helpers/listTestResources/nested/pipeline file.sdspipe b/DSL-langium/tests/resources/helpers/listTestResources/nested/pipeline file.sdspipe new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/tests/resources/helpers/listTestResources/nested/skip pipeline file.sdspipe b/DSL-langium/tests/resources/helpers/listTestResources/nested/skip pipeline file.sdspipe new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/tests/resources/helpers/listTestResources/nested/skip stub file.sdsstub b/DSL-langium/tests/resources/helpers/listTestResources/nested/skip stub file.sdsstub new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/tests/resources/helpers/listTestResources/nested/skip test file.sdstest b/DSL-langium/tests/resources/helpers/listTestResources/nested/skip test file.sdstest new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/tests/resources/helpers/listTestResources/nested/stub file.sdsstub b/DSL-langium/tests/resources/helpers/listTestResources/nested/stub file.sdsstub new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/tests/resources/helpers/listTestResources/nested/test file.sdstest b/DSL-langium/tests/resources/helpers/listTestResources/nested/test file.sdstest new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/tests/resources/helpers/listTestResources/not a safe-ds file.txt b/DSL-langium/tests/resources/helpers/listTestResources/not a safe-ds file.txt new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/tests/resources/helpers/listTestResources/pipeline file.sdspipe b/DSL-langium/tests/resources/helpers/listTestResources/pipeline file.sdspipe new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/tests/resources/helpers/listTestResources/skip pipeline file.sdspipe b/DSL-langium/tests/resources/helpers/listTestResources/skip pipeline file.sdspipe new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/tests/resources/helpers/listTestResources/skip stub file.sdsstub b/DSL-langium/tests/resources/helpers/listTestResources/skip stub file.sdsstub new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/tests/resources/helpers/listTestResources/skip test file.sdstest b/DSL-langium/tests/resources/helpers/listTestResources/skip test file.sdstest new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/tests/resources/helpers/listTestResources/stub file.sdsstub b/DSL-langium/tests/resources/helpers/listTestResources/stub file.sdsstub new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/tests/resources/helpers/listTestResources/test file.sdstest b/DSL-langium/tests/resources/helpers/listTestResources/test file.sdstest new file mode 100644 index 000000000..e69de29bb diff --git a/DSL-langium/vitest.config.ts b/DSL-langium/vitest.config.ts new file mode 100644 index 000000000..24f0bcb1b --- /dev/null +++ b/DSL-langium/vitest.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from 'vitest/config'; + +export default defineConfig({ + test: { + chaiConfig: { + truncateThreshold: 0, + }, + }, +}); diff --git a/DSL/langium/SafeDS-types.langium b/DSL/langium/SafeDS-types.langium deleted file mode 100644 index 3814ca862..000000000 --- a/DSL/langium/SafeDS-types.langium +++ /dev/null @@ -1,428 +0,0 @@ - -interface SdsCompilationUnit extends SdsAbstractDeclaration { - imports: SdsImport[] - members: SdsAbstractAnnotatedObject[] -} - -interface SdsAbstractDeclaration extends SdsAbstractAnnotatedObject { - annotationCallList?: SdsAnnotationCallList - name?: string -} - -interface SdsAbstractAnnotatedObject extends SdsAbstractObject { - annotationCalls: SdsAnnotationCall[] -} - -interface SdsAbstractObject { -} - -interface SdsAnnotationCall extends SdsAbstractCall { - annotation?: @SdsAnnotation -} - -interface SdsAbstractCall extends SdsAbstractObject { - argumentList?: SdsArgumentList -} - -interface SdsArgumentList extends SdsAbstractObject { - arguments: SdsArgument[] -} - -interface SdsArgument extends SdsAbstractExpression { - parameter?: @SdsParameter - value?: SdsAbstractExpression -} - -interface SdsAbstractExpression extends SdsAbstractObject { -} - -interface SdsParameter extends SdsAbstractLocalVariable { - defaultValue?: SdsAbstractExpression - ^type?: SdsAbstractType - variadic: boolean -} - -interface SdsAbstractLocalVariable extends SdsAbstractDeclaration { -} - -interface SdsAbstractType extends SdsAbstractObject { -} - -interface SdsAnnotation extends SdsAbstractCallable, SdsAbstractCompilationUnitMember { - constraint?: SdsConstraint -} - -interface SdsAbstractCallable extends SdsAbstractObject { - parameterList?: SdsParameterList -} - -interface SdsParameterList extends SdsAbstractObject { - parameters: SdsParameter[] -} - -interface SdsAbstractCompilationUnitMember extends SdsAbstractDeclaration { -} - -interface SdsConstraint extends SdsAbstractObject { - body?: SdsBlock -} - -interface SdsBlock extends SdsAbstractObject { - statements: SdsAbstractStatement[] -} - -interface SdsAbstractStatement extends SdsAbstractObject { -} - -interface SdsAnnotationCallList extends SdsAbstractAnnotatedObject { -} - -interface SdsImport extends SdsAbstractObject { - importedNamespace?: string - alias?: SdsImportAlias -} - -interface SdsImportAlias extends SdsAbstractObject { - name?: string -} - -interface SdsClass extends SdsAbstractCallable, SdsAbstractClassMember, SdsAbstractCompilationUnitMember, SdsAbstractNamedTypeDeclaration { - typeParameterList?: SdsTypeParameterList - parentTypeList?: SdsParentTypeList - body?: SdsClassBody -} - -interface SdsAbstractClassMember extends SdsAbstractDeclaration { -} - -interface SdsAbstractNamedTypeDeclaration extends SdsAbstractDeclaration { -} - -interface SdsTypeParameterList extends SdsAbstractObject { - typeParameters: SdsTypeParameter[] -} - -interface SdsTypeParameter extends SdsAbstractNamedTypeDeclaration { - variance?: string - kind?: string -} - -interface SdsParentTypeList extends SdsAbstractObject { - parentTypes: SdsAbstractType[] -} - -interface SdsClassBody extends SdsAbstractObject { - members: SdsAbstractObject[] -} - -interface SdsEnum extends SdsAbstractNamedTypeDeclaration, SdsAbstractClassMember, SdsAbstractCompilationUnitMember { - body?: SdsEnumBody -} - -interface SdsEnumBody extends SdsAbstractObject { - variants: SdsEnumVariant[] -} - -interface SdsEnumVariant extends SdsAbstractCallable, SdsAbstractNamedTypeDeclaration { - typeParameterList?: SdsTypeParameterList - constraint?: SdsConstraint -} - -interface SdsFunction extends SdsAbstractCallable, SdsAbstractClassMember, SdsAbstractCompilationUnitMember, SdsAbstractProtocolToken { - static: boolean - typeParameterList?: SdsTypeParameterList - resultList?: SdsResultList - body?: SdsFunctionBody -} - -interface SdsAbstractProtocolToken extends SdsAbstractDeclaration { -} - -interface SdsResultList extends SdsAbstractObject { - results: SdsResult[] -} - -interface SdsResult extends SdsAbstractResult { - ^type?: SdsAbstractType -} - -interface SdsAbstractResult extends SdsAbstractDeclaration { -} - -interface SdsFunctionBody extends SdsAbstractObject { - statements: SdsAbstractObject[] -} - -interface SdsPredicate extends SdsAbstractCompilationUnitMember, SdsAbstractCallable { - typeParameterList?: SdsTypeParameterList - resultList?: SdsResultList - body?: SdsBlock -} - -interface SdsSchema extends SdsAbstractCompilationUnitMember { - columnList?: SdsColumnList -} - -interface SdsColumnList extends SdsAbstractObject { - columns: SdsColumn[] -} - -interface SdsColumn extends SdsAbstractObject { - columnName?: SdsString - columnType?: SdsAbstractType -} - -interface SdsString extends SdsAbstractLiteral { - value?: string -} - -interface SdsAbstractLiteral extends SdsAbstractExpression { -} - -interface SdsPipeline extends SdsAbstractCompilationUnitMember { - body?: SdsBlock -} - -interface SdsStep extends SdsAbstractCallable, SdsAbstractCompilationUnitMember { - visibility?: string - resultList?: SdsResultList - body?: SdsBlock -} - -interface SdsMemberType extends SdsAbstractType { - member?: SdsNamedType - receiver?: SdsAbstractType -} - -interface SdsNamedType extends SdsAbstractType { - declaration?: @SdsAbstractNamedTypeDeclaration - nullable: boolean - typeArgumentList?: SdsTypeArgumentList -} - -interface SdsTypeArgumentList extends SdsAbstractObject { - typeArguments: SdsTypeArgument[] -} - -interface SdsTypeArgument extends SdsAbstractObject { - typeParameter?: @SdsTypeParameter - value?: SdsAbstractTypeArgumentValue -} - -interface SdsAbstractTypeArgumentValue extends SdsAbstractObject { -} - -interface SdsParenthesizedType extends SdsAbstractType { - ^type?: SdsAbstractType -} - -interface SdsAttribute extends SdsAbstractClassMember, SdsAbstractProtocolToken { - static: boolean - ^type?: SdsAbstractType -} - -interface SdsProtocol extends SdsAbstractObject { - body?: SdsProtocolBody -} - -interface SdsProtocolBody extends SdsAbstractObject { - subtermList?: SdsProtocolSubtermList - term?: SdsAbstractProtocolTerm -} - -interface SdsProtocolSubtermList extends SdsAbstractObject { - subterms: SdsProtocolSubterm[] -} - -interface SdsProtocolSubterm extends SdsAbstractProtocolToken { - term?: SdsAbstractProtocolTerm -} - -interface SdsAbstractProtocolTerm extends SdsAbstractObject { -} - -interface SdsProtocolAlternative extends SdsAbstractProtocolTerm { - terms: SdsAbstractProtocolTerm[] -} - -interface SdsProtocolSequence extends SdsAbstractProtocolTerm { - terms: SdsAbstractProtocolTerm[] -} - -interface SdsProtocolQuantifiedTerm extends SdsAbstractProtocolTerm { - term?: SdsAbstractProtocolTerm - quantifier?: string -} - -interface SdsProtocolComplement extends SdsAbstractProtocolTerm { - universe?: SdsProtocolTokenClass - referenceList?: SdsProtocolReferenceList -} - -interface SdsProtocolTokenClass extends SdsAbstractProtocolTerm { - value?: string -} - -interface SdsProtocolReferenceList extends SdsAbstractProtocolTerm { - references: SdsProtocolReference[] -} - -interface SdsProtocolReference extends SdsAbstractProtocolTerm { - token?: @SdsAbstractProtocolToken -} - -interface SdsProtocolParenthesizedTerm extends SdsAbstractProtocolTerm { - term?: SdsAbstractProtocolTerm -} - -interface SdsLambdaParameterList extends SdsAbstractExpression, SdsParameterList { -} - -interface SdsAssignment extends SdsAbstractStatement { - assigneeList?: SdsAssigneeList - expression?: SdsAbstractExpression -} - -interface SdsAssigneeList extends SdsAbstractObject { - assignees: SdsAbstractAssignee[] -} - -interface SdsAbstractAssignee extends SdsAbstractObject { -} - -interface SdsPlaceholder extends SdsAbstractAssignee, SdsAbstractLocalVariable { -} - -interface SdsWildcard extends SdsAbstractAssignee { -} - -interface SdsYield extends SdsAbstractAssignee { - result?: @SdsResult -} - -interface SdsExpressionStatement extends SdsAbstractStatement { - expression?: SdsAbstractExpression -} - -interface SdsSchemaPlaceholder extends SdsAbstractAssignee, SdsAbstractNamedTypeDeclaration { -} - -interface SdsSchemaYield extends SdsAbstractAssignee { - ^type?: SdsSchemaType -} - -interface SdsSchemaType extends SdsAbstractType { - declaration?: @SdsAbstractNamedTypeDeclaration -} - -interface SdsBlockLambda extends SdsAbstractLambda { - body?: SdsBlock -} - -interface SdsAbstractLambda extends SdsAbstractCallable, SdsAbstractExpression { -} - -interface SdsExpressionLambda extends SdsAbstractLambda { - result?: SdsAbstractExpression -} - -interface SdsBlockLambdaResult extends SdsAbstractAssignee, SdsAbstractResult { -} - -interface SdsInfixOperation extends SdsAbstractExpression { - leftOperand?: SdsAbstractExpression - operator?: string - rightOperand?: SdsAbstractExpression -} - -interface SdsPrefixOperation extends SdsAbstractExpression { - operand?: SdsAbstractExpression - operator?: string -} - -interface SdsCall extends SdsAbstractCall, SdsAbstractChainedExpression { - typeArgumentList?: SdsTypeArgumentList -} - -interface SdsAbstractChainedExpression extends SdsAbstractExpression { - receiver?: SdsAbstractExpression -} - -interface SdsIndexedAccess extends SdsAbstractChainedExpression { - index?: SdsAbstractExpression -} - -interface SdsMemberAccess extends SdsAbstractChainedExpression { - member?: SdsReference - nullSafe: boolean -} - -interface SdsReference extends SdsAbstractExpression { - declaration?: @SdsAbstractDeclaration -} - -interface SdsSchemaReference extends SdsAbstractExpression { - ^type?: SdsSchemaType -} - -interface SdsBoolean extends SdsAbstractLiteral { - true: boolean -} - -interface SdsFloat extends SdsAbstractNumber { - value?: number -} - -interface SdsAbstractNumber extends SdsAbstractLiteral { -} - -interface SdsInt extends SdsAbstractNumber { - value?: number -} - -interface SdsNull extends SdsAbstractLiteral { -} - -interface SdsParenthesizedExpression extends SdsAbstractExpression { - expression?: SdsAbstractExpression -} - -interface SdsTemplateString extends SdsAbstractExpression { - expressions: SdsAbstractExpression[] -} - -interface SdsTemplateStringStart extends SdsAbstractTemplateStringPart { -} - -interface SdsAbstractTemplateStringPart extends SdsAbstractLiteral { - value?: string -} - -interface SdsTemplateStringInner extends SdsAbstractTemplateStringPart { -} - -interface SdsTemplateStringEnd extends SdsAbstractTemplateStringPart { -} - -interface SdsCallableType extends SdsAbstractCallable, SdsAbstractType { - resultList?: SdsResultList -} - -interface SdsUnionType extends SdsAbstractType { - typeArgumentList?: SdsTypeArgumentList -} - -interface SdsTypeProjection extends SdsAbstractTypeArgumentValue { - ^type?: SdsAbstractType - variance?: string -} - -interface SdsTypeParameterConstraint extends SdsAbstractStatement { - leftOperand?: @SdsTypeParameter - operator?: string - rightOperand?: SdsAbstractType -} - -interface SdsStarProjection extends SdsAbstractTypeArgumentValue { -} - diff --git a/DSL/langium/SafeDS.langium b/DSL/langium/SafeDS.langium deleted file mode 100644 index ea9c11b46..000000000 --- a/DSL/langium/SafeDS.langium +++ /dev/null @@ -1,493 +0,0 @@ -grammar SafeDS -import 'SafeDS-types' - -entry SdsCompilationUnit returns SdsCompilationUnit: - {SdsCompilationUnit} annotationCalls+=SdsAnnotationCall * ('package' name=QualifiedName )? imports+=SdsImport * members+=SdsCompilationUnitMember * -; - -SdsCompilationUnitMember returns SdsAbstractAnnotatedObject: - {SdsAnnotationCallList} annotationCalls+=SdsAnnotationCall * ({SdsAnnotation.annotationCallList=current} 'annotation' name=ID parameterList=SdsParameterList ? constraint=SdsConstraint ? | {SdsClass.annotationCallList=current} 'class' name=ID typeParameterList=SdsTypeParameterList ? parameterList=SdsParameterList ? parentTypeList=SdsParentTypeList ? body=SdsClassBody ? | {SdsEnum.annotationCallList=current} 'enum' name=ID body=SdsEnumBody ? | {SdsFunction.annotationCallList=current} 'fun' name=ID typeParameterList=SdsTypeParameterList ? parameterList=SdsParameterList resultList=SdsResultList ? body=SdsFunctionBody ? | {SdsPredicate.annotationCallList=current} 'predicate' name=ID typeParameterList=SdsTypeParameterList ? parameterList=SdsPredicateParameterList resultList=SdsPredicateResultList ? body=SdsPredicateBlock | {SdsPredicate.annotationCallList=current} 'abstract' 'predicate' name=ID typeParameterList=SdsTypeParameterList ? parameterList=SdsPredicateParameterList resultList=SdsPredicateResultList ? | {SdsSchema.annotationCallList=current} 'schema' name=ID columnList=SdsColumnList | {SdsPipeline.annotationCallList=current} 'pipeline' name=ID body=SdsBlock | {SdsStep.annotationCallList=current} visibility=('internal' | 'private' )? 'step' name=ID parameterList=SdsParameterList resultList=SdsResultList ? body=SdsBlock ) -; - -SdsImport returns SdsImport: - 'import' importedNamespace=QualifiedNameWithWildcard alias=SdsImportAlias ? -; - -SdsImportAlias returns SdsImportAlias: - 'as' name=ID -; - -SdsAnnotationCall returns SdsAnnotationCall: - '@' annotation=[SdsAnnotation:ID ] argumentList=SdsAnnotationCallArgumentList ? -; - -SdsAnnotationCallArgumentList returns SdsArgumentList: - {SdsArgumentList} '(' (arguments+=SdsAnnotationCallArgument (',' arguments+=SdsAnnotationCallArgument )* ','? )? ')' -; - -SdsAnnotationCallArgument returns SdsArgument: - (parameter=[SdsParameter:ID ] '=' )? value=SdsExpression -; - -SdsParentTypeList returns SdsParentTypeList: - 'sub' parentTypes+=SdsParentType (',' parentTypes+=SdsParentType )* ','? -; - -SdsParentType returns SdsAbstractType: - SdsParentPrimaryType {SdsMemberType.receiver=current} '.' member=SdsNamedType * -; - -SdsParentPrimaryType returns SdsAbstractType: - SdsNamedType | SdsParentParenthesizedType -; - -SdsParentParenthesizedType returns SdsParenthesizedType: - '(' ^type=SdsParentType ')' -; - -SdsClassBody returns SdsClassBody: - {SdsClassBody} '{' members+=SdsClassMember * '}' -; - -SdsClassMember returns SdsAbstractObject: - SdsAnnotatedClassMember | SdsProtocol | SdsConstraint -; - -SdsAnnotatedClassMember returns SdsAbstractAnnotatedObject: - {SdsAnnotationCallList} annotationCalls+=SdsAnnotationCall * ({SdsAttribute.annotationCallList=current} static?='static' ? 'attr' name=ID (':' ^type=SdsType )? | {SdsClass.annotationCallList=current} 'class' name=ID typeParameterList=SdsTypeParameterList ? parameterList=SdsParameterList ? parentTypeList=SdsParentTypeList ? body=SdsClassBody ? | {SdsEnum.annotationCallList=current} 'enum' name=ID body=SdsEnumBody ? | {SdsFunction.annotationCallList=current} static?='static' ? 'fun' name=ID typeParameterList=SdsTypeParameterList ? parameterList=SdsParameterList resultList=SdsResultList ? body=SdsFunctionBody ? ) -; - -SdsConstraint returns SdsConstraint: - 'constraint' body=SdsConstraintBlock -; - -SdsProtocol returns SdsProtocol: - 'protocol' body=SdsProtocolBody -; - -SdsProtocolBody returns SdsProtocolBody: - {SdsProtocolBody} '{' subtermList=SdsProtocolSubtermList ? term=SdsProtocolTerm ? '}' -; - -SdsProtocolSubtermList returns SdsProtocolSubtermList: - subterms+=SdsProtocolSubterm + -; - -SdsProtocolSubterm returns SdsProtocolSubterm: - 'subterm' name=ID '=' term=SdsProtocolTerm ';' -; - -SdsProtocolTerm returns SdsAbstractProtocolTerm: - SdsProtocolAlternative -; - -SdsProtocolAlternative returns SdsAbstractProtocolTerm: - SdsProtocolSequence ({SdsProtocolAlternative.terms+=current} '|' terms+=SdsProtocolSequence ('|' terms+=SdsProtocolSequence )* )? -; - -SdsProtocolSequence returns SdsAbstractProtocolTerm: - SdsProtocolQuantifiedTerm ({SdsProtocolSequence.terms+=current} terms+=SdsProtocolQuantifiedTerm (terms+=SdsProtocolQuantifiedTerm )* )? -; - -SdsProtocolQuantifiedTerm returns SdsAbstractProtocolTerm: - SdsProtocolPrimaryElement ({SdsProtocolQuantifiedTerm.term=current} quantifier=SdsProtocolQuantifier )? -; - -SdsProtocolQuantifier returns string: - '?' | '*' | '+' -; - -SdsProtocolPrimaryElement returns SdsAbstractProtocolTerm: - SdsProtocolComplement | SdsProtocolReference | SdsProtocolTokenClass | SdsProtocolParenthesizedTerm -; - -SdsProtocolComplement returns SdsProtocolComplement: - {SdsProtocolComplement} '[' universe=SdsProtocolTokenClass ? '^' referenceList=SdsProtocolReferenceList ? ']' -; - -SdsProtocolReferenceList returns SdsProtocolReferenceList: - references+=SdsProtocolReference + -; - -SdsProtocolReference returns SdsProtocolReference: - token=[SdsAbstractProtocolToken:ID ] -; - -SdsProtocolTokenClass returns SdsProtocolTokenClass: - value=SdsProtocolTokenClassValue -; - -SdsProtocolTokenClassValue returns string: - '.' | '\\a' | '\\f' -; - -SdsProtocolParenthesizedTerm returns SdsProtocolParenthesizedTerm: - '(' term=SdsProtocolTerm ')' -; - -SdsEnumBody returns SdsEnumBody: - {SdsEnumBody} '{' variants+=SdsEnumVariant * '}' -; - -SdsEnumVariant returns SdsEnumVariant: - annotationCalls+=SdsAnnotationCall * name=ID typeParameterList=SdsTypeParameterList ? parameterList=SdsParameterList ? constraint=SdsConstraint ? -; - -SdsParameterList returns SdsParameterList: - {SdsParameterList} '(' (parameters+=SdsParameter (',' parameters+=SdsParameter )* ','? )? ')' -; - -SdsLambdaParameterList returns SdsLambdaParameterList: - {SdsLambdaParameterList} '(' (parameters+=SdsParameter (',' parameters+=SdsParameter )* ','? )? ')' -; - -SdsParameter returns SdsParameter: - annotationCalls+=SdsAnnotationCall * variadic?='vararg' ? name=ID (':' ^type=SdsType )? ('=' defaultValue=SdsExpression )? -; - -SdsPredicateParameterList returns SdsParameterList: - {SdsParameterList} '(' (parameters+=SdsPredicateParameter (',' parameters+=SdsPredicateParameter )* ','? )? ')' -; - -SdsPredicateParameter returns SdsParameter: - annotationCalls+=SdsAnnotationCall * (variadic?='vararg' ? name=ID (':' ^type=SdsType )? ('=' defaultValue=SdsExpression )? | ^type=SdsSchemaType ) -; - -SdsResultList returns SdsResultList: - {SdsResultList} '->' results+=SdsResult | {SdsResultList} '->' '(' (results+=SdsResult (',' results+=SdsResult )* ','? )? ')' -; - -SdsResult returns SdsResult: - annotationCalls+=SdsAnnotationCall * name=ID (':' ^type=SdsType )? -; - -SdsPredicateResultList returns SdsResultList: - {SdsResultList} '->' results+=SdsPredicateResult -; - -SdsPredicateResult returns SdsResult: - annotationCalls+=SdsAnnotationCall * ^type=SdsSchemaType -; - -SdsFunctionBody returns SdsFunctionBody: - {SdsFunctionBody} '{' statements+=SdsFunctionStatement * '}' -; - -SdsFunctionStatement returns SdsAbstractObject: - SdsConstraint -; - -SdsBlock returns SdsBlock: - {SdsBlock} '{' statements+=SdsStatement * '}' -; - -SdsStatement returns SdsAbstractStatement: - SdsAssignment | SdsExpressionStatement -; - -SdsAssignment returns SdsAssignment: - assigneeList=SdsAssigneeList '=' expression=SdsExpression ';' -; - -SdsAssigneeList returns SdsAssigneeList: - assignees+=SdsAssignee (',' assignees+=SdsAssignee )* ','? -; - -SdsAssignee returns SdsAbstractAssignee: - {SdsPlaceholder} 'val' name=ID | {SdsWildcard} '_' | {SdsYield} 'yield' result=[SdsResult:ID ] -; - -SdsExpressionStatement returns SdsExpressionStatement: - expression=SdsExpression ';' -; - -SdsConstraintBlock returns SdsBlock: - {SdsBlock} '{' (statements+=SdsConstraintStatement (',' statements+=SdsConstraintStatement )* )? '}' -; - -SdsConstraintStatement returns SdsAbstractStatement: - SdsPredicateAssignment | SdsPredicateExpressionStatement | SdsTypeParameterConstraint -; - -SdsPredicateBlock returns SdsBlock: - {SdsBlock} '{' (statements+=SdsPredicateStatement (',' statements+=SdsPredicateStatement )* )? '}' -; - -SdsPredicateStatement returns SdsAbstractStatement: - SdsPredicateAssignment | SdsPredicateExpressionStatement -; - -SdsPredicateAssignment returns SdsAssignment: - assigneeList=SdsPredicateAssigneeList '=' expression=SdsExpression -; - -SdsPredicateAssigneeList returns SdsAssigneeList: - assignees+=SdsPredicateAssignee (',' assignees+=SdsPredicateAssignee )* ','? -; - -SdsPredicateAssignee returns SdsAbstractAssignee: - {SdsPlaceholder} 'val' name=ID | {SdsWildcard} '_' | {SdsSchemaPlaceholder} 'val' '::' name=ID | {SdsSchemaYield} 'yield' ^type=SdsSchemaType -; - -SdsPredicateExpressionStatement returns SdsExpressionStatement: - expression=SdsExpression -; - -SdsExpression returns SdsAbstractExpression: - SdsLambda | SdsOrExpression -; - -SdsLambda returns SdsAbstractExpression: - SdsLambdaParameterList ({SdsBlockLambda.parameterList=current} body=SdsBlockLambdaBlock | {SdsExpressionLambda.parameterList=current} '->' result=SdsExpression ) -; - -SdsBlockLambdaBlock returns SdsBlock: - {SdsBlock} '{' statements+=SdsBlockLambdaStatement * '}' -; - -SdsBlockLambdaStatement returns SdsAbstractStatement: - SdsBlockLambdaAssignment | SdsExpressionStatement -; - -SdsBlockLambdaAssignment returns SdsAssignment: - assigneeList=SdsBlockLambdaAssigneeList '=' expression=SdsExpression ';' -; - -SdsBlockLambdaAssigneeList returns SdsAssigneeList: - assignees+=SdsBlockLambdaAssignee (',' assignees+=SdsBlockLambdaAssignee )* ','? -; - -SdsBlockLambdaAssignee returns SdsAbstractAssignee: - {SdsWildcard} '_' | {SdsPlaceholder} 'val' name=ID | {SdsBlockLambdaResult} 'yield' name=ID -; - -SdsOrExpression returns SdsAbstractExpression: - SdsAndExpression ({SdsInfixOperation.leftOperand=current} operator='or' rightOperand=SdsAndExpression )* -; - -SdsAndExpression returns SdsAbstractExpression: - SdsNotExpression ({SdsInfixOperation.leftOperand=current} operator='and' rightOperand=SdsNotExpression )* -; - -SdsNotExpression returns SdsAbstractExpression: - {SdsPrefixOperation} operator='not' operand=SdsNotExpression | SdsEqualityExpression -; - -SdsEqualityExpression returns SdsAbstractExpression: - SdsComparisonExpression ({SdsInfixOperation.leftOperand=current} operator=SdsEqualityOperator rightOperand=SdsComparisonExpression )? -; - -SdsEqualityOperator returns string: - '==' | '!=' | '===' | '!==' -; - -SdsComparisonExpression returns SdsAbstractExpression: - SdsAdditiveExpression ({SdsInfixOperation.leftOperand=current} operator=SdsComparisonOperator rightOperand=SdsAdditiveExpression )? -; - -SdsComparisonOperator returns string: - '<' | '<=' | '>=' | '>' -; - -SdsAdditiveExpression returns SdsAbstractExpression: - SdsMultiplicativeExpression ({SdsInfixOperation.leftOperand=current} operator=SdsAdditiveOperator rightOperand=SdsMultiplicativeExpression )* -; - -SdsAdditiveOperator returns string: - '+' | '-' -; - -SdsMultiplicativeExpression returns SdsAbstractExpression: - SdsElvisExpression ({SdsInfixOperation.leftOperand=current} operator=SdsMultiplicativeOperator rightOperand=SdsElvisExpression )* -; - -SdsMultiplicativeOperator returns string: - '*' | '/' -; - -SdsElvisExpression returns SdsAbstractExpression: - SdsUnaryOperation ({SdsInfixOperation.leftOperand=current} operator='?:' rightOperand=SdsUnaryOperation )* -; - -SdsUnaryOperation returns SdsAbstractExpression: - {SdsPrefixOperation} operator='-' operand=SdsUnaryOperation | SdsChainedExpression -; - -SdsChainedExpression returns SdsAbstractExpression: - SdsPrimaryExpression {SdsCall.receiver=current} typeArgumentList=SdsTypeArgumentList ? argumentList=SdsCallArgumentList | {SdsIndexedAccess.receiver=current} '[' index=SdsExpression ']' | {SdsMemberAccess.receiver=current} (nullSafe?='?' )? '.' member=SdsReference * -; - -SdsCallArgumentList returns SdsArgumentList: - {SdsArgumentList} '(' (arguments+=SdsCallArgument (',' arguments+=SdsCallArgument )* ','? )? ')' -; - -SdsCallArgument returns SdsArgument: - (parameter=[SdsParameter:ID ] '=' )? value=SdsExpression -; - -SdsPrimaryExpression returns SdsAbstractExpression: - SdsLiteral | SdsParenthesizedExpression | SdsReference | SdsTemplateString | {SdsSchemaReference} ^type=SdsSchemaType -; - -SdsLiteral returns SdsAbstractLiteral: - SdsBoolean | SdsFloat | SdsInt | SdsNull | SdsString -; - -SdsBoolean returns SdsBoolean: - true?='true' | {SdsBoolean} 'false' -; - -SdsFloat returns SdsFloat: - value=FLOAT -; - -SdsInt returns SdsInt: - value=INT -; - -SdsNull returns SdsNull: - {SdsNull} 'null' -; - -SdsString returns SdsString: - value=STRING -; - -SdsReference returns SdsReference: - declaration=[SdsAbstractDeclaration:ID ] -; - -SdsParenthesizedExpression returns SdsParenthesizedExpression: - '(' expression=SdsExpression ')' -; - -SdsTemplateString returns SdsTemplateString: - expressions+=SdsTemplateStringStart expressions+=SdsExpression ? (expressions+=SdsTemplateStringInner expressions+=SdsExpression ? )* expressions+=SdsTemplateStringEnd -; - -SdsTemplateStringStart returns SdsTemplateStringStart: - value=TEMPLATE_STRING_START -; - -SdsTemplateStringInner returns SdsTemplateStringInner: - value=TEMPLATE_STRING_INNER -; - -SdsTemplateStringEnd returns SdsTemplateStringEnd: - value=TEMPLATE_STRING_END -; - -SdsColumnList returns SdsColumnList: - {SdsColumnList} '{' (columns+=SdsColumn (',' columns+=SdsColumn )* ','? )? '}' -; - -SdsColumn returns SdsColumn: - columnName=SdsString ":" columnType=SdsType -; - -QualifiedName returns string: - ID ('.' ID )* -; - -QualifiedNameWithWildcard returns string: - QualifiedName ('.' '*' )? -; - -SdsType returns SdsAbstractType: - SdsPrimaryType {SdsMemberType.receiver=current} '.' member=SdsNamedType * -; - -SdsPrimaryType returns SdsAbstractType: - SdsCallableType | SdsNamedType | SdsUnionType | SdsParenthesizedType -; - -SdsParenthesizedType returns SdsParenthesizedType: - '(' ^type=SdsType ')' -; - -SdsCallableType returns SdsCallableType: - parameterList=SdsParameterList resultList=SdsResultList -; - -SdsNamedType returns SdsNamedType: - declaration=[SdsAbstractNamedTypeDeclaration:ID ] typeArgumentList=SdsTypeArgumentList ? (nullable?='?' )? -; - -SdsSchemaType returns SdsSchemaType: - '::' declaration=[SdsAbstractNamedTypeDeclaration:ID ] -; - -SdsUnionType returns SdsUnionType: - 'union' typeArgumentList=SdsUnionTypeArgumentList -; - -SdsUnionTypeArgumentList returns SdsTypeArgumentList: - {SdsTypeArgumentList} ('<' (typeArguments+=SdsUnionTypeArgument (',' typeArguments+=SdsUnionTypeArgument )* ','? )? '>' ) -; - -SdsUnionTypeArgument returns SdsTypeArgument: - value=SdsUnionTypeArgumentValue -; - -SdsUnionTypeArgumentValue returns SdsAbstractTypeArgumentValue: - {SdsTypeProjection} ^type=SdsType -; - -SdsTypeParameterList returns SdsTypeParameterList: - {SdsTypeParameterList} ('<' (typeParameters+=SdsTypeParameter (',' typeParameters+=SdsTypeParameter )* ','? )? '>' ) -; - -SdsTypeParameter returns SdsTypeParameter: - annotationCalls+=SdsAnnotationCall * variance=SdsTypeParameterVariance ? name=ID ('::' kind=SdsTypeParameterKind )? -; - -SdsTypeParameterVariance returns string: - 'in' | 'out' -; - -SdsTypeParameterKind returns string: - '$SchemaType' | '$ExpressionType' | '$IntType' | '$FloatType' | '$BooleanType' | '$StringType' | '$NamedType' -; - -SdsTypeParameterConstraint returns SdsTypeParameterConstraint: - leftOperand=[SdsTypeParameter:ID ] operator=SdsTypeParameterConstraintOperator rightOperand=SdsType -; - -SdsTypeParameterConstraintOperator returns string: - 'sub' | 'super' -; - -SdsTypeArgumentList returns SdsTypeArgumentList: - {SdsTypeArgumentList} '<' (typeArguments+=SdsTypeArgument (',' typeArguments+=SdsTypeArgument )* ','? )? '>' -; - -SdsTypeArgument returns SdsTypeArgument: - (typeParameter=[SdsTypeParameter:ID ] '=' )? value=SdsTypeArgumentValue -; - -SdsTypeArgumentValue returns SdsAbstractTypeArgumentValue: - {SdsStarProjection} '*' | {SdsTypeProjection} variance=SdsTypeParameterVariance ? ^type=SdsType -; - -terminal FLOAT returns number:DECIMAL_DIGIT+ '.' DECIMAL_DIGIT+ FLOAT_EXPONENT? | DECIMAL_DIGIT+ FLOAT_EXPONENT ; -terminal DECIMAL_DIGIT returns string:'0' ..'9' ; -terminal FLOAT_EXPONENT returns string:('e' | 'E' )('+' | '-' )?DECIMAL_DIGIT+ ; -terminal ID returns string:IDENTIFIER | '`' IDENTIFIER '`' ; -terminal IDENTIFIER returns string:('a' ..'z' | 'A' ..'Z' | '_' )('a' ..'z' | 'A' ..'Z' | '_' | '0' ..'9' )* | SCHEMA_EFFECT ; -terminal SCHEMA_EFFECT returns string:'$readSchema' | '$checkColumn' | '$removeColumn' | '$keepColumn' | '$renameColumn' | '$addColumn' | '$changeColumnType' ; -terminal INT returns number:DECIMAL_DIGIT+ ; -hidden terminal ML_COMMENT returns string:'/*' -> '*/' ; -hidden terminal SL_COMMENT returns string:'//' !('\r' | '\n' )('\r'? '\n' )? ; -terminal STRING returns string:STRING_START STRING_TEXT* STRING_END ; -terminal STRING_START returns string:STRING_DELIMITER ; -terminal STRING_END returns string:'{'? STRING_DELIMITER ; -terminal STRING_DELIMITER returns string:'"' ; -terminal STRING_TEXT returns string:'{'? ESCAPE_SEQUENCE | '{'? !('\\' | STRING_DELIMITER | '{' ) ; -terminal ESCAPE_SEQUENCE returns string:'\\' . ; -terminal TEMPLATE_EXPRESSION_START returns string:'{{' ; -terminal TEMPLATE_EXPRESSION_END returns string:'}}' ; -terminal TEMPLATE_STRING_START returns string:STRING_START STRING_TEXT* TEMPLATE_EXPRESSION_START ; -terminal TEMPLATE_STRING_INNER returns string:TEMPLATE_EXPRESSION_END STRING_TEXT* TEMPLATE_EXPRESSION_START ; -terminal TEMPLATE_STRING_END returns string:TEMPLATE_EXPRESSION_END STRING_TEXT* STRING_END ; -hidden terminal TEST_MARKER returns string:'»' | '«' ; -hidden terminal WS returns string:(' ' | '\t' | '\r' | '\n' )+; diff --git a/docs/development/dsl-development-checklist.md b/docs/development/dsl-development-checklist.md index d5ae9bb16..b6413cdb2 100644 --- a/docs/development/dsl-development-checklist.md +++ b/docs/development/dsl-development-checklist.md @@ -7,9 +7,7 @@ 1. Update the grammar (_concrete syntax_). - 1. Create [grammar tests][grammar-tests]: - 1. Positive tests (with comment `// no_syntax_error`) - 1. Negative tests (with comment `// syntax_error`) + 1. Create [grammar tests][grammar-tests]. 1. Run the tests (`./gradlew test`). There should be failures. 1. Update the [Xtext grammar file][safeds.xtext]. 1. Run the tests again (`./gradlew test`). Tests should now pass. @@ -66,7 +64,7 @@ [experimental-sds-api]: https://github.com/lars-reimann/Safe-DS/blob/main/DSL/com.larsreimann.safeds/src/main/kotlin/com/larsreimann/safeds/utils/MarkerAnnotations.kt [safeds.ecore]: https://github.com/lars-reimann/Safe-DS/blob/main/DSL/com.larsreimann.safeds/model/SafeDS.ecore [safeds.genmodel]: https://github.com/lars-reimann/Safe-DS/blob/main/DSL/com.larsreimann.safeds/model/SafeDS.genmodel -[grammar-tests]: https://github.com/lars-reimann/Safe-DS/blob/main/DSL/com.larsreimann.safeds/src/test/resources/grammar +[grammar-tests]: ./grammar-testing.md [safeds.xtext]: https://github.com/lars-reimann/Safe-DS/blob/main/DSL/com.larsreimann.safeds/src/main/kotlin/com/larsreimann/safeds/SafeDS.xtext [converter-tests]: https://github.com/lars-reimann/Safe-DS/blob/main/DSL/com.larsreimann.safeds/src/test/kotlin/com/larsreimann/safeds/conversion [converters]: https://github.com/lars-reimann/Safe-DS/blob/main/DSL/com.larsreimann.safeds/src/main/kotlin/com/larsreimann/safeds/conversion diff --git a/docs/development/grammar-testing.md b/docs/development/grammar-testing.md new file mode 100644 index 000000000..82b910798 --- /dev/null +++ b/docs/development/grammar-testing.md @@ -0,0 +1,38 @@ +# Grammar Testing + +Grammar tests are data driven instead of being specified explicitly. This document explains how to add a new grammar test. + +## Adding a grammar test + +1. Create a new file with extension `.sdstest` in the `DSL-langium/tests/resources/grammar` directory or any + subdirectory. Give the file a descriptive name, since the file name becomes part of the test name. + + !!! note "Naming convention" + + By convention, the names of files that **should not** contain syntax errors should be prefixed with `good-` and the names of files that **should** contain syntax errors with `bad-`. This is irrelevant for the test runner, but it helps to keep the tests organized. + + !!! tip "Skipping a test" + + If you want to skip a test, add the prefix `skip-` to the file name. + +2. If you want to assert that a file is parsed without a syntax error[^1], add the following comment to the file: + ```ts + // $TEST$ no_syntax_error + ``` + If you instead want to assert that the parser detects a syntax error, add the following comment to the file: + ```ts + // $TEST$ syntax_error + ``` + + !!! warning + + The two comments are mutually exclusive. You must have exactly one in a grammar test file. + + !!! note "Comment placement" + + By convention, the comment should be placed at the start of the file. + +3. Add the Safe-DS code that you want to test to the file. +4. Run the tests. The test runner will automatically pick up the new test. + +[^1]: We do not differentiate whether the error originated in the lexer (error code `lexing-error`) or the actual parser (error code `parsing-error`). Both are treated as syntax errors. diff --git a/docs/language/common/types.md b/docs/language/common/types.md index 785a1e956..94a2679c6 100644 --- a/docs/language/common/types.md +++ b/docs/language/common/types.md @@ -349,14 +349,6 @@ If exactly one result is expected, the surrounding parentheses may be also remov (a: Int, b: Int) -> r: Int ``` -### Parenthesized Types - -To improve clarity, parts of a type or the entire type can be enclosed in parentheses. The parentheses have no special meaning and are just meant as a visual guide. Here is an example: - -```txt -(Int) -``` - ## Corresponding Python Code **Note:** This section is only relevant if you are interested in the [stub language][stub-language]. @@ -393,7 +385,6 @@ The following table shows how Safe-DS types can be written as Python [type hints | `union` | `Union[str, int]` | | `(a: Int, b: Int) -> r: Int` | `Callable[[int, int], int]` | | `(a: Int, b: Int) -> (r: Int, s: Int)` | `Callable[[int, int], Tuple[int, int]]` | -| `(SomeClass)` | No exact equivalent. Convert the type without parentheses instead. | Most of these are rather self-explanatory. We will, however, cover the translation of [callable types](#callable-types) in a little more detail: In Python, the type hint for a callable type has the following general syntax: diff --git a/mkdocs.yml b/mkdocs.yml index 8ba88acc9..0178ae031 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -34,6 +34,7 @@ nav: - safeds.lang: stdlib/safeds_lang.md - Development: - DSL Development Checklist: development/dsl-development-checklist.md + - Grammar Testing: development/grammar-testing.md - Release Checklist: development/release-checklist.md # Configuration of MkDocs & Material for MkDocs --------------------------------