Skip to content

Commit

Permalink
Merge pull request #144 from tobb10001/readme-deprecation-warning
Browse files Browse the repository at this point in the history
fix: deprecation warning from README
  • Loading branch information
smacker authored Feb 8, 2024
2 parents 5175f84 + 8ec5d6b commit ad63693
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ Create a parser with a grammar:

```go
import (
"context"
"fmt"

sitter "github.com/smacker/go-tree-sitter"
"github.com/smacker/go-tree-sitter/javascript"
)
Expand All @@ -23,7 +26,7 @@ Parse some code:

```go
sourceCode := []byte("let a = 1")
tree := parser.Parse(nil, sourceCode)
tree, _ := parser.ParseCtx(context.Background(), nil, sourceCode)
```

Inspect the syntax tree:
Expand Down

0 comments on commit ad63693

Please sign in to comment.