Files
herolib/lib/core/code/model.v
2025-03-24 06:44:39 +01:00

40 lines
514 B
V

module code
// Code is a list of statements
// pub type Code = []CodeItem
pub type CodeItem = Alias
| Comment
| CustomCode
| Function
| Import
| Struct
| Sumtype
| Interface
// item for adding custom code in
pub struct CustomCode {
pub:
text string
}
pub struct Comment {
pub:
text string
is_multi bool
}
pub struct Sumtype {
pub:
name string
description string
types []Type
}
pub struct Attribute {
pub:
name string // [name]
has_arg bool
arg string // [name: arg]
}