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

tree-sitter-compat

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tree-sitter-compat

Compatibility module for old v8 API based language bindings for node-tree-sitter

  • 0.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.6K
decreased by-69.85%
Maintainers
1
Weekly downloads
 
Created
Source

node-tree-sitter-compat

Compatibility module for old v8 API based language bindings for node-tree-sitter.

Grammars should be updated by running tree-sitter generate so they no longer require this. Also note that the old grammar bindings were not context aware (Won't work in Electron and/or workers).

This is a no-op if called an a Node API based language bindings so you can always just call it on all your languages to have support for both old and new ones.

Usage

import { convertLanguage } from 'tree-sitter-compat';
import Parser from 'tree-sitter';
import JavaScript from 'tree-sitter-javascript';

const parser = new Parser();
parser.setLanguage(convertLanguage(JavaScript));

Keywords

FAQs

Package last updated on 17 Apr 2024

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc