npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

tree-sitter-snowflake

v0.3.0

Published

Tree-sitter grammar for Snowflake SQL

Readme

tree-sitter-snowflake

Verify crates.io crates.io npm

A tree-sitter grammar for Snowflake SQL, written from scratch (see NOTICE). It covers Snowflake only: no other SQL dialect and no fallback. A file it cannot parse produces ERROR nodes for the consumer to measure, never a best-effort tree. See Syntax coverage for the supported statements.

Installation

cargo add tree-sitter-snowflake
npm install tree-sitter-snowflake

The optional snowflake-handlers companion, for extracting and parsing embedded procedure and function bodies, is on crates.io as well: cargo add snowflake-handlers.

Requirements

The Rust crate compiles the committed C parser through cc, so it needs a C compiler and Rust 1.85 or later; the snowflake-handlers crate needs Rust 1.90 or later. The Node package declares tree-sitter ^0.25 as an optional peer dependency.

Usage

let mut parser = tree_sitter::Parser::new();
parser.set_language(&tree_sitter_snowflake::LANGUAGE.into())?;
let tree = parser.parse("SELECT 1;", None);
import Snowflake from 'tree-sitter-snowflake';

const program = Snowflake.nodeTypeInfo.find((node) => node.type === 'program');
console.log(program?.children?.types);

nodeTypeInfo holds the entries from src/node-types.json; an entry's optional children property is an object with multiple, required, and types properties, not an array, and leaf entries can omit both fields and children.

Procedure and function bodies in JavaScript, Python, Java, and Scala are exposed as nodes; the companion snowflake-handlers crate extracts and parses them. See Embedded bodies and Consumer integration.

How to contribute

Branch from dev. Build with npm ci --ignore-scripts && npm rebuild tree-sitter-cli && npx --no-install tree-sitter generate && cargo build, run the checks listed in CONTRIBUTING.md, and open a pull request against dev. For how the pieces fit together, see ARCHITECTURE.md.

License

MIT — see LICENSE and NOTICE.