2021-10-06 09:30:38 +00:00
|
|
|
|
|
|
|
import
|
2023-05-18 10:20:44 +00:00
|
|
|
preserves
|
2021-10-06 09:30:38 +00:00
|
|
|
|
|
|
|
type
|
2023-12-31 17:15:06 +00:00
|
|
|
Instance* {.preservesRecord: "Instance".} = object
|
2021-10-06 09:30:38 +00:00
|
|
|
`name`*: string
|
2023-12-31 17:15:06 +00:00
|
|
|
`argument`*: Value
|
2021-10-06 09:30:38 +00:00
|
|
|
|
2023-12-31 17:15:06 +00:00
|
|
|
proc `$`*(x: Instance): string =
|
|
|
|
`$`(toPreserves(x))
|
2021-10-06 09:30:38 +00:00
|
|
|
|
2023-12-31 17:15:06 +00:00
|
|
|
proc encode*(x: Instance): seq[byte] =
|
|
|
|
encode(toPreserves(x))
|