tcase.nim 347 B

123456789101112131415161718
  1. type
  2. MyEnum = enum
  3. nkIf, nkElse, nkElif
  4. proc test(a: MyEnum) =
  5. case a
  6. of nkElse: discard
  7. of #[!]#
  8. discard """
  9. $nimsuggest --tester $file
  10. >sug $1
  11. sug;;skEnumField;;nkElse;;MyEnum;;$file;;4;;10;;"";;100;;None
  12. sug;;skEnumField;;nkElif;;MyEnum;;$file;;4;;18;;"";;100;;None
  13. sug;;skEnumField;;nkIf;;MyEnum;;$file;;4;;4;;"";;100;;None
  14. """