support enum variants having specified values #29
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Extra attention is needed
The kdl-script parser supports enum variants having an assigned value (IntExpr)
abi-cafe/kdl-script/src/parse.rs
Lines 273 to 280 in 6ba6865
But the type system throws it out.
abi-cafe/kdl-script/src/types.rs
Lines 259 to 264 in 6ba6865
Once the type system supports it, the backends need to be changed to use it:
abi-cafe/src/abis/rust/declare.rs
Lines 209 to 216 in 6ba6865
abi-cafe/src/abis/c/declare.rs
Lines 250 to 257 in 6ba6865
Arguably IntExpr shouldn't be used here, since it artificially clamps to i64. In general we don't have a good story for talking about arbitrary primitive values that rust (and kdl) can't express. But i64 is good enough to start with.
The text was updated successfully, but these errors were encountered: