2 releases
0.1.1 | Dec 10, 2021 |
---|---|
0.1.0 | Dec 10, 2021 |
#463 in Text editors
92KB
3K
SLoC
tree-sitter-prisma
lib.rs
:
This crate provides a Prisma grammar for the tree-sitter parsing library.
Typically, you will use the language function to add this grammar to a tree-sitter Parser, and then use the parser to parse some code:
use tree_sitter::Parser;
let code = r#"
datasource db {
provider = "postgresql"
url = env("DATABASE_URL")
}
"#;
let mut parser = Parser::new();
parser.set_language(tree_sitter_prisma::language()).expect("Error loading Prisma grammar");
let parsed = parser.parse(code, None);
Dependencies
~2.7–4MB
~75K SLoC