Socket
Socket
Sign inDemoInstall

lezer-tree

Package Overview
Dependencies
0
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    lezer-tree

Syntax tree data structure for the lezer parser


Version published
Maintainers
1
Install size
260 kB
Created

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.

Readme

Source

lezer-tree

[ WEBSITE | ISSUES | FORUM | CHANGELOG ]

Lezer is an incremental GLR parser intended for use in an editor or similar system.

Lezer-tree provides the syntax tree data structure that lezer outputs.

Its programming interface is documented on the website.

This code is licensed under an MIT license.

FAQs

Last updated on 23 Oct 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc