tsug_pragmas.nim 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. template fooBar1() {.pragma.}
  2. proc fooBar2() = discard
  3. macro fooBar3(x: untyped) = discard
  4. {.pragma: fooBar4 fooBar3.}
  5. proc test1() {.fooBar#[!]#.} = discard
  6. var test2 {.fooBar#[!]#.} = 9
  7. type
  8. Person {.fooBar#[!]#.} = object
  9. hello {.fooBar#[!]#.}: string
  10. Callback = proc () {.fooBar#[!]#.}
  11. # Check only macros/templates/pragmas are suggested
  12. discard """
  13. $nimsuggest --tester $file
  14. >sug $1
  15. sug;;skTemplate;;fooBar4;;;;$file;;4;;8;;"";;100;;Prefix
  16. sug;;skTemplate;;tsug_pragmas.fooBar1;;template ();;$file;;1;;9;;"";;100;;Prefix
  17. sug;;skMacro;;tsug_pragmas.fooBar3;;macro (x: untyped){.noSideEffect, gcsafe, raises: <inferred> [].};;$file;;3;;6;;"";;50;;Prefix
  18. >sug $2
  19. sug;;skTemplate;;fooBar4;;;;$file;;4;;8;;"";;100;;Prefix
  20. sug;;skTemplate;;tsug_pragmas.fooBar1;;template ();;$file;;1;;9;;"";;100;;Prefix
  21. sug;;skMacro;;tsug_pragmas.fooBar3;;macro (x: untyped){.noSideEffect, gcsafe, raises: <inferred> [].};;$file;;3;;6;;"";;50;;Prefix
  22. >sug $3
  23. sug;;skTemplate;;fooBar4;;;;$file;;4;;8;;"";;100;;Prefix
  24. sug;;skTemplate;;tsug_pragmas.fooBar1;;template ();;$file;;1;;9;;"";;100;;Prefix
  25. sug;;skMacro;;tsug_pragmas.fooBar3;;macro (x: untyped){.noSideEffect, gcsafe, raises: <inferred> [].};;$file;;3;;6;;"";;50;;Prefix
  26. >sug $4
  27. sug;;skTemplate;;fooBar4;;;;$file;;4;;8;;"";;100;;Prefix
  28. sug;;skTemplate;;tsug_pragmas.fooBar1;;template ();;$file;;1;;9;;"";;100;;Prefix
  29. sug;;skMacro;;tsug_pragmas.fooBar3;;macro (x: untyped){.noSideEffect, gcsafe, raises: <inferred> [].};;$file;;3;;6;;"";;50;;Prefix
  30. >sug $5
  31. sug;;skTemplate;;fooBar4;;;;$file;;4;;8;;"";;100;;Prefix
  32. sug;;skTemplate;;tsug_pragmas.fooBar1;;template ();;$file;;1;;9;;"";;100;;Prefix
  33. sug;;skMacro;;tsug_pragmas.fooBar3;;macro (x: untyped){.noSideEffect, gcsafe, raises: <inferred> [].};;$file;;3;;6;;"";;50;;Prefix
  34. """