Skip to content

Commit 5d1cf22

Browse files
committed
README
1 parent 5c50098 commit 5d1cf22

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

README.md

+16
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,22 @@ nnkCall.newTree(nnkDotExpr.newTree(e, newIdentNode(! "f")),
2424
nnkInfix.newTree(newIdentNode(! "+"), newLit(2), newLit(3)))
2525
```
2626

27+
It's equivalent to
28+
29+
```nim
30+
macro s(b: untyped): untyped =
31+
var e = newIdentNode(!"e")
32+
result = buildMacro:
33+
call:
34+
dotExpr:
35+
e
36+
ident("f")
37+
infix:
38+
ident("+")
39+
2
40+
3
41+
```
42+
2743
## functionality
2844

2945
You use it invoking `buildMacro` with a singular child corresponding to the node you want to build

0 commit comments

Comments
 (0)