`$next` isn't usable in setting virtual fields
Open
enhancement
language feature
- Dominant language
- Python
- Stars
- 92
- Forks
- 30
- PR merge metrics
- No merged PRs in 30d
Description
Suppose I have the following Emboss definition:
```
struct Foo:
0 [+1] UInt bar
$next [+1] UInt baz
let version_0_01_size = $next
```
If I wanted to store the current offset in a virtual field such that I can access it in code later, I'm currently unable to do this. I get the following error:
```
error: Keyword `$next` may not be used in this context.
```
I think this would be pretty useful to have so as to avoid repeating values or potentially make mistakes in counting offsets.
Contributor guide
Assessment
This issue has not been assessed yet.