Skip to content

Commit 6ebd95a

Browse files
committed
Add doc about patcher
1 parent 182716c commit 6ebd95a

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

docs/Usage.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,14 @@ func main() {
200200
}
201201
```
202202

203+
## Patch
204+
205+
Implemented visitor can be applied before compiling AST to bytecode in `expr.Compile` function.
206+
207+
```go
208+
program, err := expr.Compile(code, expr.Patch(&visitor{}))
209+
```
210+
203211
## ConstExpr
204212

205213
Expr has support for constant expression evaluation during compile time.

0 commit comments

Comments
 (0)