Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

lezer-tree

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

lezer-tree - npm Package Versions

23

0.13.2

Diff

Changelog

Source

0.13.2 (2021-02-17)

New features

Add support for context tracking.

marijn
published 0.13.1 •

Changelog

Source

0.13.1 (2021-02-11)

Bug fixes

Fix a bug where building a tree from a buffer would go wrong for repeat nodes whose children were all repeat nodes of the same type.

marijn
published 0.13.0 •

Changelog

Source

0.13.0 (2020-12-04)

Breaking changes

NodeType.isRepeated is now called isAnonymous, which more accurately describes what it means.

NodeGroup has been renamed to NodeSet to avoid confusion with NodeProp.group.

The applyChanges method on trees is no longer supported (TreeFragment is now used to track reusable content).

Trees no longer have cut and append methods.

New features

It is now possible to pass a node ID to SyntaxNode.getChild/getChildren and NodeType.is. Allow specifying a tree length in Tree.build

Tree.build now allows you to specify the length of the resulting tree.

Tree.fullCursor() can now be used to get a cursor that includes anonymous nodes, rather than skipping them.

Introduces NodeType.define to define node types.

The new TreeFragment type is used to manage reusable subtrees for incremental parsing.

Tree.build now accepts a start option indicating the start offset of the tree.

The Input type, which used to be InputStream in the lezer package, is now exported from this package.

This package now exports a PartialParse interface, which describes the interface used, for example, as return type from Parser.startParse.

marijn
published 0.12.3 •

Changelog

Source

0.12.3 (2020-11-02)

New features

Make NodePropSource a function type.

marijn
published 0.12.2 •

Changelog

Source

0.12.2 (2020-10-28)

Bug fixes

Fix a bug that made SyntaxNode.prevSibling fail in most cases when the node is part of a buffer.

marijn
published 0.12.1 •

Changelog

Source

0.12.1 (2020-10-26)

Bug fixes

Fix issue where using Tree.append with an empty tree as argument would return a tree with a nonsensical length property.

marijn
published 0.12.0 •

Changelog

Source

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.

marijn
published 0.11.1 •

Changelog

Source

0.11.1 (2020-09-26)

Bug fixes

Fix lezer depencency versions

marijn
published 0.11.0 •

Changelog

Source

0.11.0 (2020-09-26)

Breaking changes

Adjust to new output format of repeat rules.

marijn
published 0.10.0 •

Changelog

Source

0.10.0 (2020-08-07)

Breaking changes

No longer list internal properties in the type definitions.

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc