Skip to content

Commit

Permalink
Mark version 0.12.0
Browse files Browse the repository at this point in the history
  • Loading branch information
marijnh committed Oct 23, 2020
1 parent 11f25a2 commit f9a7c32
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,29 @@
## 0.12.0 (2020-10-23)

### Breaking changes

`Tree.iterate` no longer allows returning from inside the iteration (use cursors directly for that kind of use cases).

`Subtree` has been renamed to `SyntaxNode` and narrowed in scope a little.

The `top`, `skipped`, and `error` node props no longer exist.

### New features

The package now offers a `TreeCursor` abstraction, which can be used for both regular iteration and for custom traversal of a tree.

`SyntaxNode` instances have `nextSibling`/`prevSibling` getters that allow more direct navigation through the tree.

Node types now expose `isTop`, `isSkipped`, `isError`, and `isRepeated` properties that indicate special status.

Adds `NodeProp.group` to assign group names to node types.

Syntax nodes now have helper functions `getChild` and `getChildren` to retrieve direct child nodes by type or group.

`NodeType.match` (and thus `NodeProp.add`) now allows types to be targeted by group name.

Node types have a new `is` method for checking whether their name or one of their groups matches a given string.

## 0.11.1 (2020-09-26)

### Bug fixes
Expand Down
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "lezer-tree",
"version": "0.11.1",
"version": "0.12.0",
"description": "Syntax tree data structure for the lezer parser",
"main": "dist/tree.cjs",
"type": "module",
Expand Down

0 comments on commit f9a7c32

Please sign in to comment.