glassesneo / seiryu

Streamline your Nim code.
MIT License
6 stars 0 forks source link

`{.initial.}` pragma for constructor #1

Open glassesneo opened 2 months ago

glassesneo commented 2 months ago
proc new*(T: type A, v1 {.initial.} = 5, v2: = ""): T

is converted into

proc new*(T: type A, v2 = ""): T =
  result = A()
  result.v1 = 5
  result.v2 = v2
glassesneo commented 2 months ago

But I don't want seiryu to modify the function arguments..