mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v: add compile-time enum evaluation with $for item in MyEnum.fields { dump(item.value) dump(item.name) }
(#17517)
This commit is contained in:
@ -107,6 +107,12 @@ pub:
|
||||
typ int
|
||||
}
|
||||
|
||||
pub struct EnumData {
|
||||
pub:
|
||||
name string
|
||||
value i64
|
||||
}
|
||||
|
||||
// FieldData holds information about a field. Fields reside on structs.
|
||||
pub struct FieldData {
|
||||
pub:
|
||||
|
Reference in New Issue
Block a user