CDPR-Modding-Documentation / CDPR-Modding-Documentation/REDkit-bugtracker

witcherscript, annotations: support for `event` in @addMethod

Open
#5 0 comments 1 reaction 0 assignees View on GitHub
Scripting
Dominant language
No language data
Stars
7
Forks
1
PR merge metrics
No merged PRs in 30d

Description

**Is your feature request related to a problem? Please describe.**
the `@addMethod` allows to add a method to a class, however it doesn't support event functions

**Describe the solution you'd like**
Add support for the `event` type of method:
```js
@addMethod(MyClass)
event OnSpawned(spawnData : SEntitySpawnData) {}
```
Doing so currently yields this error:
```
error: syntax error, unexpected TOKEN_EVENT, expecting TOKEN_FUNCTION, near 'event'
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.