Skip to content

feat: add Kotlin step definition support#304

Open
marton78 wants to merge 1 commit into
cucumber:mainfrom
marton78:kotlin-support
Open

feat: add Kotlin step definition support#304
marton78 wants to merge 1 commit into
cucumber:mainfrom
marton78:kotlin-support

Conversation

@marton78

@marton78 marton78 commented Jun 24, 2026

Copy link
Copy Markdown

Summary

  • Adds kotlinLanguage with tree-sitter queries for class-based step definitions (@Given/@When/@Then) and @ParameterType annotations, including expression-body functions (= expr syntax)
  • Adds 'kotlin' to LanguageNames and the language registry
  • Adds Kotlin case to NodeParserAdapter
  • Adds tree-sitter-kotlin to optionalDependencies
  • Adds kotlin to scripts/build.js so kotlin.wasm is built by prepare

Dependency chain

This PR is part of two, adding Kotlin support to the Cucumber Language Server:

  1. This PRcucumber/language-service — Kotlin parsing
  2. cucumber/language-server (companion PR) — glue file discovery for .kt/.kts, wasmBasePath fix, null-settings crash fix

Test plan

  • Build passes: npm run build
  • Kotlin step definitions (@Given, @When, @Then) are recognized
  • @ParameterType annotations are recognized
  • Expression-body functions (fun step() = ...) are recognized

- Add kotlinLanguage with tree-sitter queries for class-based step
  definitions (@Given/@When/@then) and @ParameterType annotations,
  including expression-body functions (= expr syntax)
- Add 'kotlin' to LanguageNames and language registry
- Add Kotlin case to NodeParserAdapter
- Add tree-sitter-kotlin to optionalDependencies
- Add kotlin to scripts/build.js so kotlin.wasm is built by prepare

Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant