Wasm-DSL / spectec

Wasm SpecTec specification tools
https://wasm-dsl.github.io/spectec/
Other
27 stars 9 forks source link

Rendering of `null?` #125

Closed f52985 closed 2 months ago

f52985 commented 2 months ago

Hi,

This is just a simple question about the difference between the original and the spectec-written spec for the validation of convert.

The original spec has a premise that checks if two null?s are equal: 스크린샷 2024-09-11 오후 5 57 27

But the spectec-written spec does not have it: 스크린샷 2024-09-11 오후 6 02 39

Is this an intended modification of the spec?

rossberg commented 2 months ago

This is saying the same thing. The SpecTec is using a meta-variable that is the same on both sides, so the equality is implicit.

f52985 commented 2 months ago

Oh I see. I think I was mislead by the rendered version.

I was looking at the rendered version of the spec,

스크린샷 2024-09-11 오후 6 07 57

and I missed that the null? was actually supposed to be treated as a meta variable (mainly due to its color and font).

rossberg commented 2 months ago

Ah, actually, that is a problem. With that rendering hack it does not make sense. I'll prepare a fix.