dmodule.nim 469 B

123456789101112131415161718192021222324
  1. type
  2. MinKind* = enum
  3. minDictionary
  4. minBool
  5. MinValue* = object
  6. case kind*: MinKind
  7. of minDictionary:
  8. symbols: seq[MinOperator]
  9. else: discard
  10. MinOperator = object
  11. # remove this inline pragma to make it compile
  12. proc `$`*(a: MinValue): string {.inline.} =
  13. case a.kind
  14. of minDictionary:
  15. result = "hello"
  16. for i in a.symbols:
  17. result = "hello"
  18. else: discard
  19. proc parseMinValue*(): MinValue =
  20. # or this echo
  21. echo result