Skip to content

Commit 82b3eb2

Browse files
committed
Add README.md
1 parent f9723f9 commit 82b3eb2

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

cmd/exp/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# exp
2+
3+
## Install
4+
5+
```bash
6+
go get github.com/antonmedv/expr/cmd/exp
7+
```
8+
9+
## Usage
10+
11+
Print ast of program.
12+
13+
```bash
14+
echo '1 + 2' | exp -ast
15+
```
16+
17+
Disassemble bytecode to human readable format.
18+
19+
```bash
20+
echo 'map(0..9, {# * 2})' | exp -bytecode
21+
```
22+
23+
Run expression.
24+
25+
```bash
26+
echo '2**8' | exp -run
27+
```
28+
29+
Start interactive debugger.
30+
31+
```bash
32+
echo 'all(1..3, {# > 0})' | exp -debug
33+
```

0 commit comments

Comments
 (0)