Skip to content

Commit 71ca89c

Browse files
committed
Document usage
1 parent f779c92 commit 71ca89c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ Or install it yourself as:
2323

2424
## Usage
2525

26+
From code:
27+
2628
```ruby
2729
require 'syntax_tree'
2830

@@ -34,6 +36,15 @@ raise if parser.error?
3436
pp node
3537
```
3638

39+
From the CLI:
40+
41+
```sh
42+
$ stree program.rb
43+
(program
44+
(statements
45+
...
46+
```
47+
3748
## Development
3849
3950
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.

0 commit comments

Comments
 (0)