start of tests refactoring; sqlite3 new wrapper fixes
This commit is contained in:
parent
6bc16904ed
commit
d913fdb280
173 changed files with 206 additions and 238 deletions
19
tests/accept/run/tquotewords.nim
Normal file
19
tests/accept/run/tquotewords.nim
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
# Test an idea I recently had:
|
||||
|
||||
import macros
|
||||
|
||||
macro quoteWords(n: expr): expr =
|
||||
result = newNimNode(nnkBracket, n)
|
||||
for i in 1..n.len-1:
|
||||
expectKind(n[i], nnkIdent)
|
||||
result.add(toStrLit(n[i]))
|
||||
|
||||
const
|
||||
myWordList = quoteWords(this, an, example)
|
||||
|
||||
var s = ""
|
||||
for w in items(myWordList):
|
||||
s.add(w)
|
||||
|
||||
echo s #OUT thisanexample
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue