Advertisement
Guest User

Untitled

a guest
Jan 13th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Nim 0.25 KB | None | 0 0
  1. type
  2.     Color = enum
  3.         red, orange, yellow, green, blue, indigo, violet
  4.  
  5. macro color_test*(c: Color): typed =
  6.     #color.intVal <- this doesn't work "f"
  7.     #[
  8.         what i'd like to do
  9.         if c <= yellow: ...
  10.     ]#
  11.     return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement